Gemini
š¢ Announcing our research paper: Mem0 achieves 26% higher accuracy than OpenAI Memory, 91% lower latency, and 90% token savings! Read the paper to learn how we're revolutionizing AI agent memory.
To use the Gemini model, set the GEMINI_API_KEY
environment variable. You can obtain the Gemini API key from Google AI Studio.
Note: As of the latest release, Mem0 uses the new
google.genai
SDK instead of the deprecatedgoogle.generativeai
. All message formatting and model interaction now use the updatedtypes
module fromgoogle.genai
.
Note: Some Gemini models are being deprecated and will retire soon. It is recommended to migrate to the latest stable models like
"gemini-2.0-flash-001"
or"gemini-2.0-flash-lite-001"
to ensure ongoing support and improvements.
Usage
Config
All available parameters for the Gemini
config are present in Master List of All Params in Config.