PHP code example of papi-ai / ingest-gitingest
1. Go to this page and download the library: Download papi-ai/ingest-gitingest library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
papi-ai / ingest-gitingest example snippets
use PapiAI\Ingest\Depth;
use PapiAI\Ingest\Gitingest\GitingestIngestor;
use PapiAI\Ingest\IngestRequest;
$ingestor = new GitingestIngestor();
$digest = $ingestor->ingest(new IngestRequest(
source: 'https://github.com/papi-ai/papi-core',
depth: Depth::Full,
tokenBudget: 8000,
));
echo $digest->toPrompt();
new GitingestIngestor(token: $_ENV['GITHUB_TOKEN']);
use PapiAI\Ingest\PhpSymbols\PhpSymbolExtractor;
new GitingestIngestor(extractor: new PhpSymbolExtractor());