Skip to main content
Version: latest

agrag.vectordb.build_vector_store

build_vector_store(value:VectorStoreName | VectorStore, *, tracer:Tracer | None = None) -> VectorStore

Construct a named vector index or return an existing instance unchanged.

Parameters:

  • value (VectorStoreName | VectorStore) – A supported backend name or an existing vector store.
  • tracer (Tracer | None) – Forwarded to a newly constructed store. An existing instance's tracer is fixed at its own construction.

Returns:

  • VectorStore – A vector store that initializes on first use.

Raises:

  • ValueError – The name is unknown, or tracer accompanies an instance.