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 | [Weaviate](https://weaviate.io/) is an open-source vector search engine. It allows efficient storage and retrieval of high-dimensional vector embeddings, enabling powerful search and retrieval capabilities. |
| #2 | |
| #3 | |
| #4 | ### Installation |
| #5 | ```bash |
| #6 | pip install weaviate weaviate-client |
| #7 | ``` |
| #8 | |
| #9 | ### Usage |
| #10 | |
| #11 | ```python Python |
| #12 | import os |
| #13 | from mem0 import Memory |
| #14 | |
| #15 | os.environ["OPENAI_API_KEY"] = "sk-xx" |
| #16 | |
| #17 | config = { |
| #18 | "vector_store": { |
| #19 | "provider": "weaviate", |
| #20 | "config": { |
| #21 | "collection_name": "test", |
| #22 | "cluster_url": "http://localhost:8080", |
| #23 | "auth_client_secret": None, |
| #24 | } |
| #25 | } |
| #26 | } |
| #27 | |
| #28 | m = Memory.from_config(config) |
| #29 | messages = [ |
| #30 | {"role": "user", "content": "I'm planning to watch a movie tonight. Any recommendations?"}, |
| #31 | {"role": "assistant", "content": "How about a thriller movie? They can be quite engaging."}, |
| #32 | {"role": "user", "content": "I’m not a big fan of thriller movies but I love sci-fi movies."}, |
| #33 | {"role": "assistant", "content": "Got it! I'll avoid thriller recommendations and suggest sci-fi movies in the future."} |
| #34 | ] |
| #35 | m.add(messages, user_id="alice", metadata={"category": "movies"}) |
| #36 | ``` |
| #37 | |
| #38 | ### Config |
| #39 | |
| #40 | Here are the parameters available for configuring Weaviate: |
| #41 | |
| #42 | | Parameter | Description | Default Value | |
| #43 | | --- | --- | --- | |
| #44 | | `collection_name` | The name of the collection to store the vectors | `mem0` | |
| #45 | | `embedding_model_dims` | Dimensions of the embedding model | `1536` | |
| #46 | | `cluster_url` | URL for the Weaviate server | `None` | |
| #47 | | `auth_client_secret` | API key for Weaviate authentication | `None` | |