neuron-core/php-vector

PHPVector adapter for the Neuron AI framework.

Maintainers

Package info

github.com/neuron-core/php-vector

pkg:composer/neuron-core/php-vector

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

1.1.0 2026-06-04 13:02 UTC

This package is auto-updated.

Last update: 2026-06-04 13:04:25 UTC


README

PHPVector adapter for the Neuron AI framework. Implements NeuronAI\RAG\VectorStore\VectorStoreInterface on top of ezimuel/phpvector.

Dependencies

Installation

composer require neuron-core/php-vector

Usage

Inside a Neuron RAG class:

class MyRAG extends RAG
{
    ...

    protected function vectorStore(): VectorStoreInterface
    {
        return new PHPVector(
            path: '/var/data/mydb',
            topK: 5,
        );
    }
}

Use it as a standalone component:

use NeuronAI\PHPVector\PHPVector;
use PHPVector\VectorDatabase;

// Persistent database: pass a path to enable on-disk storage.
$store = new PHPVector(
    path: '/var/data/mydb',
    topK: 5,
);

Persistence

By default, this adapter auto-saves after every mutation (addDocument, addDocuments, deleteBy), batched to a single save() per call, so persistence "just works".

Deletion

deleteBy() removes documents by Neuron's sourceType / sourceName, which this adapter stores as PHPVector metadata:

$store->deleteBy('pdf');               // all documents from sourceType "pdf"
$store->deleteBy('pdf', 'manual.pdf'); // only that exact source