File size: 713 Bytes
cf42286 3a72e1d a0c24d5 cf42286 a0c24d5 cf42286 a0c24d5 cf42286 a0c24d5 cf42286 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | from pydantic_settings import BaseSettings, SettingsConfigDict
from pathlib import Path
class Settings(BaseSettings):
groq_api_key: str
groq_model: str = "llama-3.3-70b-versatile"
embed_model: str = "BAAI/bge-small-en-v1.5"
host: str = "0.0.0.0"
port: int = 7860
upload_dir: Path = Path("uploads")
chroma_dir: Path = Path("chroma_store")
max_file_size: int = 20 * 1024 * 1024
max_scrape_bytes: int = 5 * 1024 * 1024
scrape_timeout_seconds: float = 15.0
similarity_top_k: int = 4
model_config = SettingsConfigDict(
env_file=".env",
env_file_encoding="utf-8",
case_sensitive=False,
extra="ignore",
)
settings = Settings()
|