PHP code example of endless-creativity / elephant-php-neuron
1. Go to this page and download the library: Download endless-creativity/elephant-php-neuron 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/ */
endless-creativity / elephant-php-neuron example snippets
use NeuronAI\RAG\DataLoader\FileDataLoader;
use EndlessCreativity\ElephantPhpNeuron\DocxReader;
$documents = FileDataLoader::for(__DIR__.'/knowledge')
->addReader('docx', new DocxReader())
->getDocuments();
MyRAG::make()->addDocuments($documents);
FileDataLoader::for($path)
->addReader('docx', new DocxReader())
->getDocuments(['format' => DocxReader::FORMAT_MARKDOWN]);