Spaces:
Runtime error
Runtime error
Download config.py from Multimedika/Bot_Development: direct link, hf CLI and curl.
- Browser
- Download file 979 Bytes
-
https://huggingface.co/spaces/Multimedika/Bot_Development/resolve/main/config.py
- Command line
-
hf download hf://spaces/Multimedika/Bot_Development/config.py
-
curl -L -o config.py https://huggingface.co/spaces/Multimedika/Bot_Development/resolve/main/config.py
979 Bytes
| from pydantic_settings import BaseSettings | |
| from dotenv import load_dotenv | |
| import os | |
| load_dotenv() | |
| class MysqlConfig(BaseSettings): | |
| DB_HOST: str = "" | |
| DB_PORT: str = "10707" # Default MySQL port | |
| DB_URI: str = "" | |
| DB_USERNAME: str = "" | |
| DB_PASSWORD: str = "" | |
| DB_NAME: str = "" | |
| DB_URI_SQL_ALCHEMY: str = "" | |
| class Config: | |
| env_file = ".env" | |
| env_file_encoding = "utf-8" | |
| extra = "allow" # Allow extra fields | |
| class PineconeConfig(BaseSettings): | |
| PINECONE_API_KEY: str = "" | |
| class Config: | |
| env_file = ".env" | |
| env_file_encoding = "utf-8" | |
| extra = "allow" # Allow extra fields | |
| class GPTBotConfig(BaseSettings): | |
| temperature : float = 0.3 | |
| model : str = "gpt-4o-mini" | |
| max_tokens : int = 4096 | |
| streaming : bool = False | |
| api_key : str = os.environ.get("OPENAI_API_KEY") | |
| # Load configuration | |
| MYSQL_CONFIG = MysqlConfig() | |
| PINECONE_CONFIG = PineconeConfig() | |
| GPTBOT_CONFIG = GPTBotConfig() | |