File size: 760 Bytes
419df71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# src/chimera/config.py
import os
from dotenv import load_dotenv

# Load environment variables from .env file if it exists (for local dev)
load_dotenv()

# Hugging Face Spaces secrets are loaded as environment variables directly
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
SERPAPI_API_KEY = os.getenv("SERPAPI_API_KEY")
# Add other keys
# OPENWEATHERMAP_API_KEY = os.getenv("OPENWEATHERMAP_API_KEY")

# Basic check
if not GEMINI_API_KEY:
    print("Warning: GEMINI_API_KEY not found in environment variables.")
if not SERPAPI_API_KEY:
    print("Warning: SERPAPI_API_KEY not found in environment variables.")

# You might add other configurations here, like model names, default locations, etc.
GEMINI_MODEL_NAME = "gemini-1.5-flash" # Or your preferred model