PHP code example of neuron-core / graph-retrieval
1. Go to this page and download the library: Download neuron-core/graph-retrieval 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/ */
neuron-core / graph-retrieval example snippets
use NeuronAI\RAG\RAG;
use NeuronAI\RAG\Retrieval\RetrievalInterface;
use NeuronAI\RAG\GraphStore\Neo4jGraphStore;
use NeuronCore\GraphRetrieval\GraphRetrieval;
class GraphRAGAgent extends RAG
{
protected function retrieval(): RetrievalInterface
{
return new GraphRetrieval(
$this->resolveVectorStore(),
$this->resolveEmbeddingsProvider(),
$this->resolveProvider(),
new Neo4jGraphStore()
);
}
protected function embeddings(): EmbeddingsProviderInterface
{
return new ...
}
protected function vectorStore(): VectorStoreInterface
{
return new ...
}
}