Spaces:
Sleeping
Sleeping
Download app/core/config.py from QDB95/qdb-knowledge-bot: direct link, hf CLI and curl.
- Browser
- Download file 1.17 kB
-
https://huggingface.co/spaces/QDB95/qdb-knowledge-bot/resolve/main/app/core/config.py
- Command line
-
hf download hf://spaces/QDB95/qdb-knowledge-bot/app/core/config.py
-
curl -L -o config.py https://huggingface.co/spaces/QDB95/qdb-knowledge-bot/resolve/main/app/core/config.py
1.17 kB
| from pathlib import Path | |
| from pydantic_settings import BaseSettings, SettingsConfigDict | |
| class Settings(BaseSettings): | |
| model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore") | |
| gemini_api_key: str = "" | |
| groq_api_key: str = "" | |
| primary_llm: str = "gemini" | |
| gemini_model: str = "gemini-2.5-flash" | |
| groq_model: str = "llama-3.3-70b-versatile" | |
| embedding_model: str = "BAAI/bge-m3" | |
| documents_dir: Path = Path("./data/documents") | |
| processed_dir: Path = Path("./data/processed") | |
| chroma_dir: Path = Path("./data/chroma_db") | |
| chroma_collection: str = "qdb_knowledge" | |
| chunk_size: int = 500 | |
| chunk_overlap: int = 50 | |
| top_k: int = 5 | |
| api_host: str = "0.0.0.0" | |
| api_port: int = 8000 | |
| ms_tenant_id: str = "" | |
| ms_client_id: str = "" | |
| ms_client_secret: str = "" | |
| ms_redirect_uri: str = "http://localhost:8501" | |
| allowed_email_domain: str = "" | |
| admin_emails: str = "" | |
| log_level: str = "INFO" | |
| def admin_email_list(self) -> list[str]: | |
| return [e.strip().lower() for e in self.admin_emails.split(",") if e.strip()] | |
| settings = Settings() | |