Team Ai
Apppublic

Multimedika/Bot_Development

sourceHugging Facemitupdated 2y agoView on Hugging Face
0likes
config.py41 linesDownload Raw Back to root
1from pydantic_settings import BaseSettings2from dotenv import load_dotenv3import os4 5load_dotenv()6 7class MysqlConfig(BaseSettings):8    DB_HOST: str = ""9    DB_PORT: str = "10707"  # Default MySQL port10    DB_URI: str = ""11    DB_USERNAME: str = ""12    DB_PASSWORD: str = ""13    DB_NAME: str = ""14    DB_URI_SQL_ALCHEMY: str = ""15 16    class Config:17        env_file = ".env"18        env_file_encoding = "utf-8"19        extra = "allow"  # Allow extra fields20 21 22class PineconeConfig(BaseSettings):23    PINECONE_API_KEY: str = ""24 25    class Config:26        env_file = ".env"27        env_file_encoding = "utf-8"28        extra = "allow"  # Allow extra fields29 30class GPTBotConfig(BaseSettings):31    temperature : float = 0.332    model : str = "gpt-4o-mini"33    max_tokens : int = 409634    streaming : bool = False35    api_key : str = os.environ.get("OPENAI_API_KEY")36 37# Load configuration38MYSQL_CONFIG = MysqlConfig()39PINECONE_CONFIG = PineconeConfig()40GPTBOT_CONFIG = GPTBotConfig()41