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 | You can use embedding models from LM Studio to run Mem0 locally. |
| #2 | |
| #3 | ### Usage |
| #4 | |
| #5 | ```python |
| #6 | import os |
| #7 | from mem0 import Memory |
| #8 | |
| #9 | os.environ["OPENAI_API_KEY"] = "your_api_key" # For LLM |
| #10 | |
| #11 | config = { |
| #12 | "embedder": { |
| #13 | "provider": "lmstudio", |
| #14 | "config": { |
| #15 | "model": "nomic-embed-text-v1.5-GGUF/nomic-embed-text-v1.5.f16.gguf" |
| #16 | } |
| #17 | } |
| #18 | } |
| #19 | |
| #20 | m = Memory.from_config(config) |
| #21 | messages = [ |
| #22 | {"role": "user", "content": "I'm planning to watch a movie tonight. Any recommendations?"}, |
| #23 | {"role": "assistant", "content": "How about thriller movies? They can be quite engaging."}, |
| #24 | {"role": "user", "content": "I’m not a big fan of thriller movies but I love sci-fi movies."}, |
| #25 | {"role": "assistant", "content": "Got it! I'll avoid thriller recommendations and suggest sci-fi movies in the future."} |
| #26 | ] |
| #27 | m.add(messages, user_id="john") |
| #28 | ``` |
| #29 | |
| #30 | ### Config |
| #31 | |
| #32 | Here are the parameters available for configuring LM Studio embedder: |
| #33 | |
| #34 | | Parameter | Description | Default Value | |
| #35 | | --- | --- | --- | |
| #36 | | `model` | The name of the LM Studio model to use | `nomic-embed-text-v1.5-GGUF/nomic-embed-text-v1.5.f16.gguf` | |
| #37 | | `embedding_dims` | Dimensions of the embedding model | `1536` | |
| #38 | | `lmstudio_base_url` | Base URL for LM Studio connection | `http://localhost:1234/v1` | |