Vector DBs
ChromaDB Agent Knowledge
Setup
Example
agent_with_knowledge.py
Async Support ⚡
ChromaDB also supports asynchronous operations, enabling concurrency and leading to better performance.
async_chroma_db.py
Use aload()
and aprint_response()
methods with asyncio.run()
for non-blocking operations in high-throughput applications.
ChromaDb Params
Parameter | Type | Default | Description |
---|---|---|---|
collection | str | - | The name of the collection to use. |
embedder | Embedder | OpenAIEmbedder() | The embedder to use for embedding document contents. |
distance | Distance | cosine | The distance metric to use. |
path | str | "tmp/chromadb" | The path where ChromaDB data will be stored. |
persistent_client | bool | False | Whether to use a persistent ChromaDB client. |
Developer Resources
- View Cookbook (Sync)
- View Cookbook (Async)