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 | [Litellm](https://litellm.vercel.app/docs/) is compatible with over 100 large language models (LLMs), all using a standardized input/output format. You can explore the [available models](https://litellm.vercel.app/docs/providers) to use with Litellm. Ensure you set the `API_KEY` for the model you choose to use. |
| #2 | |
| #3 | ## Usage |
| #4 | |
| #5 | ```python |
| #6 | import os |
| #7 | from mem0 import Memory |
| #8 | |
| #9 | os.environ["OPENAI_API_KEY"] = "your-api-key" |
| #10 | |
| #11 | config = { |
| #12 | "llm": { |
| #13 | "provider": "litellm", |
| #14 | "config": { |
| #15 | "model": "gpt-4.1-nano-2025-04-14", |
| #16 | "temperature": 0.2, |
| #17 | "max_tokens": 2000, |
| #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 | All available parameters for the `litellm` config are present in [Master List of All Params in Config](../config). |