jeevesagent.vectorstore.chroma¶
Chroma-backed vector store.
Wraps chromadb for persistent on-disk or hosted Chroma. Lazy
import — install via pip install 'jeevesagent[vectorstore-chroma]'.
Embeddings come from our framework’s Embedder protocol so
swapping embedders works the same across every vector store. We
pass None as Chroma’s embedding_function and supply
embeddings ourselves at add time.
Filter operators are translated from our Mongo-style language to
Chroma’s native where syntax (which already speaks Mongo-ish
$eq / $in / $gt etc., so the translation is mostly
direct).
Classes¶
Vector store backed by |
Module Contents¶
- class jeevesagent.vectorstore.chroma.ChromaVectorStore(embedder: jeevesagent.core.protocols.Embedder, *, collection_name: str = 'jeeves_vectors', persist_directory: str | None = None, client: Any = None)[source]¶
Vector store backed by
chromadb.- async add(chunks: list[jeevesagent.loader.base.Chunk], ids: list[str] | None = None) list[str][source]¶
- classmethod from_chunks(chunks: list[jeevesagent.loader.base.Chunk], *, embedder: jeevesagent.core.protocols.Embedder, ids: list[str] | None = None, collection_name: str = 'jeeves_vectors', persist_directory: str | None = None, client: Any = None) ChromaVectorStore[source]¶
- Async:
One-shot: construct a ChromaVectorStore + add
chunks.
- classmethod from_texts(texts: list[str], *, embedder: jeevesagent.core.protocols.Embedder, metadatas: list[dict[str, Any]] | None = None, ids: list[str] | None = None, collection_name: str = 'jeeves_vectors', persist_directory: str | None = None, client: Any = None) ChromaVectorStore[source]¶
- Async:
One-shot: construct a ChromaVectorStore from raw text strings (each becomes a
Chunkwith the matching metadata dict, or empty ifmetadatasis None).
- async search(query: str, *, k: int = 4, filter: collections.abc.Mapping[str, Any] | None = None, diversity: float | None = None) list[jeevesagent.vectorstore.base.SearchResult][source]¶
- async search_by_vector(vector: list[float], *, k: int = 4, filter: collections.abc.Mapping[str, Any] | None = None, diversity: float | None = None) list[jeevesagent.vectorstore.base.SearchResult][source]¶
- property embedder: jeevesagent.core.protocols.Embedder¶
- name = 'chroma'¶