"""central configuration for RAG application""" from __future__ import annotations import os from dataclasses import dataclass from dotenv import load_dotenv load_dotenv() @dataclass(frozen=True) class Settings: dataset_id: str = os.getenv("RAG_DATASET_ID", "rag-datasets/rag-mini-wikipedia") dataset_config: str = os.getenv("RAG_DATASET_CONFIG", "text-corpus") dataset_split: str = os.getenv("RAG_DATASET_SPLIT", "passages") generation_model: str = os.getenv( "GENERATION_MODEL", "Qwen/Qwen3-4B-Instruct-2507" ) embedding_model: str = os.getenv( "EMBEDDING_MODEL", "sentence-transformers/all-MiniLM-L6-v2" ) reranker_model: str = os.getenv( "RERANKER_MODEL", "cross-encoder/ms-marco-MiniLM-L6-v2" ) cache_dir: str = os.getenv("RAG_CACHE_DIR", ".rag_cache") max_documents: int = int(os.getenv("MAX_DOCUMENTS", "5000")) chunk_size: int = int(os.getenv("CHUNK_SIZE", "900")) chunk_overlap: int = int(os.getenv("CHUNK_OVERLAP", "140")) candidate_count: int = int(os.getenv("CANDIDATE_COUNT", "18")) hf_token: str | None = os.getenv("HF_TOKEN") or os.getenv("HUGGING_FACE_HUB_TOKEN") SETTINGS = Settings()