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 | [Milvus](https://milvus.io/) is an open-source vector database that suits AI applications of every size, from running a demo chatbot in a Jupyter notebook to building web-scale search that serves billions of users. |
| #2 | |
| #3 | ### Usage |
| #4 | |
| #5 | ```python |
| #6 | import os |
| #7 | from mem0 import Memory |
| #8 | |
| #9 | config = { |
| #10 | "vector_store": { |
| #11 | "provider": "milvus", |
| #12 | "config": { |
| #13 | "collection_name": "test", |
| #14 | "embedding_model_dims": 1536, |
| #15 | "url": "127.0.0.1", |
| #16 | "token": "8e4b8ca8cf2c67", |
| #17 | "db_name": "my_database", |
| #18 | } |
| #19 | } |
| #20 | } |
| #21 | |
| #22 | m = Memory.from_config(config) |
| #23 | messages = [ |
| #24 | {"role": "user", "content": "I'm planning to watch a movie tonight. Any recommendations?"}, |
| #25 | {"role": "assistant", "content": "How about thriller movies? They can be quite engaging."}, |
| #26 | {"role": "user", "content": "I’m not a big fan of thriller movies but I love sci-fi movies."}, |
| #27 | {"role": "assistant", "content": "Got it! I'll avoid thriller recommendations and suggest sci-fi movies in the future."} |
| #28 | ] |
| #29 | m.add(messages, user_id="alice", metadata={"category": "movies"}) |
| #30 | ``` |
| #31 | |
| #32 | ### Config |
| #33 | |
| #34 | Here are the parameters available for configuring Milvus: |
| #35 | |
| #36 | | Parameter | Description | Default Value | |
| #37 | | --- | --- | --- | |
| #38 | | `url` | Full URL/Uri for Milvus/Zilliz server | `http://localhost:19530` | |
| #39 | | `token` | Token for Zilliz server / for local setup defaults to None. | `None` | |
| #40 | | `collection_name` | The name of the collection | `mem0` | |
| #41 | | `embedding_model_dims` | Dimensions of the embedding model | `1536` | |
| #42 | | `metric_type` | Metric type for similarity search | `L2` | |
| #43 | | `db_name` | Name of the database | `""` | |
| #44 |