LangChain.VectorStore (langchainex v0.2.3)

## VectorStore Genserver, provides all the services for storing and searching vectors

You can specify a provider when you launch the GenServer in your Application tree, so you can have multiple VectorStore servers running in your application, each with a different provider.

## options: :provider -- the actual vector db provider you are using, must implement the VectorStore.Provider protocol :embed_documents -- optional function for embedding multiple docs presented as strings :embed_query -- optional function for embedding a single query when presented as a string

Link to this section Summary

Functions

Add a list of vectors to the vector store.

Returns a specification to start this module under a supervisor.

Callback implementation for GenServer.init/1.

load a vector store from a directory

perform a similarity search on the vector store if query is a string it will be run through embed_query first

perform a similarity search on the vector store and return score if query is a string it will be run through embed_query first

Link to this section Functions

Link to this function

add_documents(pid, document_list)

Link to this function

add_vectors(pid, vector_list)

Add a list of vectors to the vector store.

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Callback implementation for GenServer.init/1.

Link to this function

load(pid, directory, embeddings)

load a vector store from a directory

Link to this function

similarity_search(pid, query, k, filter)

perform a similarity search on the vector store if query is a string it will be run through embed_query first

Link to this function

similarity_search_with_score(pid, query, k, filter)

perform a similarity search on the vector store and return score if query is a string it will be run through embed_query first

Link to this function

start_link(opts \\ [])