AgentCourseU4 / config.py
Kaladin4's picture
ft: add basic agent
ab36e53
Raw
History Blame Contribute Delete
1.37 kB
from dotenv import load_dotenv
import os
from urllib.parse import unquote
load_dotenv()
class Config:
@staticmethod
def get_gemini_api_key():
return os.getenv("GEMINI_API_KEY")
@staticmethod
def get_model():
return os.getenv("OPENROUTER_MODEL")
@staticmethod
def get_exa_api_key():
return os.getenv("EXA_API_KEY")
@staticmethod
def get_openrouter_api_key():
return os.getenv("OPENROUTER_API_KEY_1")
@staticmethod
def get_default_api_url():
url = os.getenv("DEFAULT_API_URL")
if url:
if "\\x3a" in url:
return url.replace("\\x3a", ":")
return url
return None
@staticmethod
def get_openrouter_api_url():
url = os.getenv("OPENROUTER_BASE_URL")
if url:
if "\\x3a" in url:
return url.replace("\\x3a", ":")
return url
return None
@staticmethod
def get_task_file_folder():
return os.getenv("TASK_FILES_FOLDER")
@staticmethod
def get_openai_api_key():
return os.getenv("OPENAI_API_KEY")
@staticmethod
def get_defaulassociatedt_api_url():
url = os.getenv("DEFAULT_API_URL")
if url:
if "\\x3a" in url:
return url.replace("\\x3a", ":")
return url
return None