diff --git a/docs/llms.mdx b/docs/llms.mdx index b367202e..cce79430 100644 --- a/docs/llms.mdx +++ b/docs/llms.mdx @@ -14,6 +14,8 @@ Mem0 includes built-in support for various popular large language models. Memory + + ## OpenAI @@ -181,7 +183,7 @@ m.add("Likes to play cricket on weekends", user_id="alice", metadata={"category" ## Anthropic -To use anthropic's model, please set the `ANTHROPIC_API_KEY` which you find on their [Account Settings Page](https://console.anthropic.com/account/keys). +To use anthropic's models, please set the `ANTHROPIC_API_KEY` which you find on their [Account Settings Page](https://console.anthropic.com/account/keys). ```python import os @@ -204,3 +206,57 @@ m = Memory.from_config(config) m.add("Likes to play cricket on weekends", user_id="alice", metadata={"category": "hobbies"}) ``` +## Mistral AI + +To use mistral's models, please Obtain the Mistral AI api key from their [console](https://console.mistral.ai/). Set the `MISTRAL_API_KEY` environment variable to use the model as given below in the example. + +```python +import os +from mem0 import Memory + +os.environ["MISTRAL_API_KEY"] = "your-api-key" + +config = { + "llm": { + "provider": "litellm", + "config": { + "model": "open-mixtral-8x7b", + "temperature": 0.1, + "max_tokens": 2000, + } + } +} + +m = Memory.from_config(config) +m.add("Likes to play cricket on weekends", user_id="alice", metadata={"category": "hobbies"}) +``` + +## OpenAI Azure + +To use Azure AI models, you have to set the `AZURE_API_KEY`, `AZURE_API_BASE`, and `AZURE_API_VERSION` environment variables. You can obtain the Azure API key from the [Azure](https://azure.microsoft.com/). + +```python +import os +from mem0 import Memory + + +os.environ["AZURE_API_KEY"] = "your-api-key" + +# Needed to use custom models +os.environ["AZURE_API_BASE"] = "your-api-base-url" +os.environ["AZURE_API_VERSION"] = "version-to-use" + +config = { + "llm": { + "provider": "litellm", + "config": { + "model": "azure_ai/command-r-plus", + "temperature": 0.1, + "max_tokens": 2000, + } + } +} + +m = Memory.from_config(config) +m.add("Likes to play cricket on weekends", user_id="alice", metadata={"category": "hobbies"}) +``` diff --git a/docs/mint.json b/docs/mint.json index 4325b049..c8ff96c5 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -88,7 +88,7 @@ ], "footerSocials": { "x": "https://x.com/mem0ai", - "github": "https://github.com/embedchain/embedchain/mem0", + "github": "https://github.com/mem0ai/mem0", "linkedin": "https://www.linkedin.com/company/mem0/" } } \ No newline at end of file