-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
16 lines (12 loc) · 845 Bytes
/
config.py
File metadata and controls
16 lines (12 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# config.py
import os
# Best practice: Load sensitive keys from environment variables
TELEGRAM_BOT_TOKEN = os.getenv('TELEGRAM_BOT_TOKEN', 'YOUR_TELEGRAM_BOT_TOKEN_FALLBACK')
GEMINI_API_KEY = os.getenv('GEMINI_API_KEY', 'YOUR_GEMINI_API_KEY_FALLBACK')
# You can also define model names or other settings here if needed
GEMINI_MODEL_NAME = "gemini-1.5-flash-8b" # Or "gemini-1.5-flash-latest", "gemini-1.5-flash-8b" etc.
# Fallback values are provided for clarity, but you should ensure your environment variables are set.
if TELEGRAM_BOT_TOKEN == 'YOUR_TELEGRAM_BOT_TOKEN_FALLBACK':
print("Warning: TELEGRAM_BOT_TOKEN is using a fallback value. Please set the environment variable.")
if GEMINI_API_KEY == 'YOUR_GEMINI_API_KEY_FALLBACK':
print("Warning: GEMINI_API_KEY is using a fallback value. Please set the environment variable.")