repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | [Chroma](https://www.trychroma.com/) is an AI-native open-source vector database that simplifies building LLM apps by providing tools for storing, embedding, and searching embeddings with a focus on simplicity and speed. It supports both local deployment and cloud hosting through ChromaDB Cloud. |
| #2 | |
| #3 | ### Usage |
| #4 | |
| #5 | #### Local Installation |
| #6 | |
| #7 | ```python |
| #8 | import os |
| #9 | from mem0 import Memory |
| #10 | |
| #11 | os.environ["OPENAI_API_KEY"] = "sk-xx" |
| #12 | |
| #13 | config = { |
| #14 | "vector_store": { |
| #15 | "provider": "chroma", |
| #16 | "config": { |
| #17 | "collection_name": "test", |
| #18 | "path": "db", |
| #19 | # Optional: ChromaDB Cloud configuration |
| #20 | # "api_key": "your-chroma-cloud-api-key", |
| #21 | # "tenant": "your-chroma-cloud-tenant-id", |
| #22 | } |
| #23 | } |
| #24 | } |
| #25 | |
| #26 | m = Memory.from_config(config) |
| #27 | messages = [ |
| #28 | {"role": "user", "content": "I'm planning to watch a movie tonight. Any recommendations?"}, |
| #29 | {"role": "assistant", "content": "How about thriller movies? They can be quite engaging."}, |
| #30 | {"role": "user", "content": "I’m not a big fan of thriller movies but I love sci-fi movies."}, |
| #31 | {"role": "assistant", "content": "Got it! I'll avoid thriller recommendations and suggest sci-fi movies in the future."} |
| #32 | ] |
| #33 | m.add(messages, user_id="alice", metadata={"category": "movies"}) |
| #34 | ``` |
| #35 | |
| #36 | ### Config |
| #37 | |
| #38 | Here are the parameters available for configuring Chroma: |
| #39 | |
| #40 | | Parameter | Description | Default Value | |
| #41 | | --- | --- | --- | |
| #42 | | `collection_name` | The name of the collection | `mem0` | |
| #43 | | `client` | Custom client for Chroma | `None` | |
| #44 | | `path` | Path for the Chroma database | `db` | |
| #45 | | `host` | The host where the Chroma server is running | `None` | |
| #46 | | `port` | The port where the Chroma server is running | `None` | |
| #47 | | `api_key` | ChromaDB Cloud API key (for cloud usage) | `None` | |
| #48 | | `tenant` | ChromaDB Cloud tenant ID (for cloud usage) | `None` | |