moonqdrant

    A Qdrant vector store for moonbitstack/moonrag, over Qdrant's REST API.

    moonrag
    qdrant
    vector-store
    vector-database
    moonbit
    Download zip
    Version
    0.1.0
    License
    Apache-2.0
    Last updated
    9 hours ago
    Downloads
    8

    #moonqdrant

    A Qdrant vector store for moonrag, over its REST API. Native only: it opens sockets, so it is not built for js or wasm.

    moon add moonbitstack/moonqdrant

    let store = @moonqdrant.QdrantStore::new("http://127.0.0.1:6333", embedder, dimension=256)

    It implements moonrag's VectorStore. Like the in-memory, SQLite and MySQL stores it recomputes the cosine in this process and ranks by the same Filter::matches, so its results agree with the other backends rather than trusting the server.

    See this store's page, the guide and the API.

    QdrantStore

    pub struct QdrantStore {
    base : String
    collection : String
    embedder : &
    Embedder

    dimension : Int
    counter : Int
    }

    QdrantStore::add

    async fn QdrantStore::add(self : QdrantStore, documents : Array[
    Document
    ]) -> Array[String]

    QdrantStore::clear

    async fn QdrantStore::clear(self : QdrantStore) -> Unit

    Remove every stored point by recreating the collection empty.

    QdrantStore::create

    async fn QdrantStore::create(self : QdrantStore) -> Unit

    Create the collection this store needs. Safe to call on every start: an existing collection of the same shape is left as it is.

    QdrantStore::delete

    async fn QdrantStore::delete(self : QdrantStore, ids : ArrayView[String]) -> Unit

    QdrantStore::len

    async fn QdrantStore::len(self : QdrantStore) -> Int64

    The number of stored points.

    QdrantStore::new

    fn QdrantStore::new(base : String, embedder : &
    Embedder
    , dimension~ : Int, collection? : String) -> QdrantStore raise

    A store over the Qdrant server at base (for example http://127.0.0.1:6333).

    QdrantStore::search

    async fn QdrantStore::search(self : QdrantStore, vector : ArrayView[Double], limit~ : Int, filter? :
    Filter
    ) -> Array[
    Scored
    ]

    Source Files