Sentinel / debug_gemini.py
Asish Karthikeya Gogineni
Deploy Sentinel AI from GitHub
3e30d53
raw
history blame contribute delete
473 Bytes
import os
from dotenv import load_dotenv
import google.generativeai as genai
load_dotenv()
api_key = os.getenv("GOOGLE_API_KEY")
if not api_key:
print("GOOGLE_API_KEY not found.")
exit(1)
genai.configure(api_key=api_key)
print("Listing available models...")
try:
for m in genai.list_models():
if 'generateContent' in m.supported_generation_methods:
print(f"Name: {m.name}")
except Exception as e:
print(f"Error listing models: {e}")