🤖 Overview
Overview
Mem0 includes built-in support for various popular large language models. Memory can utilize the LLM provided by the user, ensuring efficient use for specific needs.
OpenAI
To use OpenAI LLM models, you have to set the OPENAI_API_KEY
environment variable. You can obtain the OpenAI API key from the OpenAI Platform.
Once you have obtained the key, you can use it like this:
Groq
Groq is the creator of the world’s first Language Processing Unit (LPU), providing exceptional speed performance for AI workloads running on their LPU Inference Engine.
In order to use LLMs from Groq, go to their platform and get the API key. Set the API key as GROQ_API_KEY
environment variable to use the model as given below in the example.
TogetherAI
To use TogetherAI LLM models, you have to set the TOGETHER_API_KEY
environment variable. You can obtain the TogetherAI API key from their Account settings page.
Once you have obtained the key, you can use it like this:
AWS Bedrock
Setup
- Before using the AWS Bedrock LLM, make sure you have the appropriate model access from Bedrock Console.
- You will also need to authenticate the
boto3
client by using a method in the AWS documentation - You will have to export
AWS_REGION
,AWS_ACCESS_KEY
, andAWS_SECRET_ACCESS_KEY
to set environment variables.
Litellm
Litellm is compatible with over 100 large language models (LLMs), all using a standardized input/output format. You can explore the available models to use with Litellm. Ensure you set the API_KEY
for the model you choose to use.
Google AI
To use Google AI model, you have to set the GOOGLE_API_KEY
environment variable. You can obtain the Google API key from the Google Maker Suite
Once you have obtained the key, you can use it like this:
Anthropic
To use anthropic’s models, please set the ANTHROPIC_API_KEY
which you find on their Account Settings Page.
Mistral AI
To use mistral’s models, please Obtain the Mistral AI api key from their console. Set the MISTRAL_API_KEY
environment variable to use the model as given below in the example.
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.