| import os | |
| import sys | |
| from google import genai | |
| api_key = "AIzaSyBYp_RCEkPAQCAqgktvPGKola55tunKo5I" | |
| print(f"[TEST] Using API Key: {api_key[:10]}...") | |
| try: | |
| print("[TEST] Creating genai Client...") | |
| client = genai.Client(api_key=api_key) | |
| print("[TEST] Client created. Generating content...") | |
| response = client.models.generate_content( | |
| model="gemini-2.5-flash", | |
| contents="Hello, say test" | |
| ) | |
| print(f"[TEST] Response received: {response.text}") | |
| except Exception as e: | |
| print(f"[TEST] Exception raised: {e}") | |