Akiragpu / scratch /inspect_google_client.py
Antigravity Assistant
fix: lock timeout 30s + training worker + PostgreSQL setup
51b711f
Raw History Blame Contribute Delete
774 Bytes
import os
from google import genai
from loguru import logger
def inspect_client():
api_key = os.getenv("GOOGLE_API_KEY") or os.getenv("GEMINI_API_KEY")
if not api_key:
print("API KEY não encontrada")
return
client = genai.Client(api_key=api_key)
print("Inspecting client.models...")
methods = [m for m in dir(client.models) if not m.startswith('_')]
print(f"Methods available in client.models: {methods}")
print("\nListing models and their supported methods:")
try:
for model in client.models.list():
print(f"Model: {model.name}, Methods: {model.supported_generation_methods}")
except Exception as e:
print(f"Error listing models: {e}")
if __name__ == "__main__":
inspect_client()