To use the Gemini model, set theDocumentation Index
Fetch the complete documentation index at: https://docs.mem0.ai/llms.txt
Use this file to discover all available pages before exploring further.
GOOGLE_API_KEY environment variable. You can obtain the Google/Gemini API key from Google AI Studio.
Note: As of the latest release, Mem0 uses the newgoogle.genaiSDK instead of the deprecatedgoogle.generativeai. All message formatting and model interaction now use the updatedtypesmodule 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 theGemini config are present in Master List of All Params in Config.