Monitor and analyze your Google Gemini API calls with AgentOps
AgentOps provides seamless integration with Google’s Generative AI API, allowing you to monitor and analyze all your Gemini model interactions automatically.
Then load the environment variables in your Python code:
Copy
from dotenv import load_dotenvimport os# Load environment variables from .env fileload_dotenv()# Set up environment variables with fallback valuesos.environ["GOOGLE_API_KEY"] = os.getenv("GOOGLE_API_KEY")os.environ["AGENTOPS_API_KEY"] = os.getenv("AGENTOPS_API_KEY")