dashhdata's picture
Upload folder using huggingface_hub
1e8bb26 verified
Raw
History Blame Contribute Delete
968 Bytes
"""Application configuration, loaded from environment / .env file."""
from functools import lru_cache
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
# Qdrant
qdrant_url: str
qdrant_api_key: str
qdrant_collection: str = "documents"
# MongoDB
mongodb_uri: str
mongodb_db: str = "doc_intelligence_rag"
# LLM via OpenRouter (OpenAI-compatible API)
openrouter_api_key: str = ""
openrouter_base_url: str = "https://openrouter.ai/api/v1"
openrouter_model: str = "anthropic/claude-sonnet-4.6"
# Embeddings (local, ONNX via fastembed — no torch needed)
embedding_model: str = "BAAI/bge-small-en-v1.5"
embedding_dim: int = 384
# Retrieval / chunking
chunk_size: int = 900
chunk_overlap: int = 150
top_k: int = 5
@lru_cache
def get_settings() -> Settings:
return Settings()