-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.py
33 lines (22 loc) · 933 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import os
from dotenv import load_dotenv
load_dotenv(override=True)
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
DISCORD_TOKEN = os.getenv("DISCORD_TOKEN")
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN")
SHARED_SECRET = os.getenv("SHARED_SECRET")
GUILD_ID = os.getenv("GUILD_ID")
GMAIL_ADDRESS = os.getenv("GMAIL_ADDRESS")
LEADERBOARD_FORUM_CHANNEL_ID = os.getenv("LEADERBOARD_FORUM_CHANNEL_ID")
GOOGLE_CREDENTIALS = os.getenv("GOOGLE_SHEETS_CREDENTIALS")
SPREADSHEET_ID = os.getenv("SPREADSHEET_ID")
LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO")
MONGO_HOST = os.getenv("MONGO_HOST")
MONGO_DB = os.getenv("MONGO_DB")
MONGO_COLLECTION = os.getenv("MONGO_COLLECTION")
GTP_ENDPOINT = os.getenv("GTP_ENDPOINT")
if LOG_LEVEL not in ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]:
print(f"Invalid log level '{LOG_LEVEL}', defaulting to 'INFO'")
LOG_LEVEL = "INFO"
MAXIMUM_COMMIT_TOKEN_COUNT = 11000
OPENAI_TOKEN_LIMIT = 124000