Spaces:
No application file
No application file
Download app/config.py from codersHub12/chatbot: direct link, hf CLI and curl.
- Browser
- Download file 767 Bytes
-
https://huggingface.co/spaces/codersHub12/chatbot/resolve/main/app/config.py
- Command line
-
hf download hf://spaces/codersHub12/chatbot/app/config.py
-
curl -L -o config.py https://huggingface.co/spaces/codersHub12/chatbot/resolve/main/app/config.py
767 Bytes
| import os | |
| from pydantic_settings import BaseSettings | |
| class Settings(BaseSettings): | |
| OPENAI_API_KEY: str | |
| GEMINI_API_KEY: str | |
| # Set to "openai" or "gemini" to choose the AI provider | |
| AI_PROVIDER: str = "openai" | |
| DATABASE_URL: str = os.getenv("DATABASE_URL", "") | |
| NEON_DATABASE_URL: str = os.getenv("NEON_DATABASE_URL", "") | |
| QDRANT_URL: str = os.getenv("QDRANT_URL", "http://localhost:6333") | |
| QDRANT_API_KEY: str = os.getenv("QDRANT_API_KEY", "") | |
| OPENAI_MODEL_CHAT: str = "gpt-4o-mini" | |
| OPENAI_MODEL_EMBEDDING: str = "text-embedding-3-small" | |
| GEMINI_MODEL_CHAT: str = "gemini-2.0-flash" | |
| GEMINI_MODEL_EMBEDDING: str = "embedding-001" | |
| class Config: | |
| env_file = ".env" | |
| extra = "ignore" | |
| settings = Settings() |