diff --git a/backend/.env.example b/backend/.env.example index cf230d4..42558be 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -1,6 +1,17 @@ LLM_BASE_URL=https://openrouter.ai/api/v1 LLM_API_KEY=your_openrouter_key_here LLM_MODEL_NAME=qwen/qwen3.5-35b-a3b +LLM_TIMEOUT=60.0 + EMBEDDING_MODEL=qwen/qwen3-embedding-4b EMBEDDING_BASE_URL=https://openrouter.ai/api/v1 +EMBEDDING_API_KEY= + CHROMA_DB_PATH=./chroma_db + +CHUNK_SIZE=1000 +CHUNK_OVERLAP=200 +RETRIEVAL_N_RESULTS=10 +RELEVANCE_THRESHOLD=7.0 + +CORS_ORIGINS=["http://localhost:5173","http://localhost:3000"] diff --git a/backend/app/core/config.py b/backend/app/core/config.py index e8c93c6..458cc14 100644 --- a/backend/app/core/config.py +++ b/backend/app/core/config.py @@ -5,13 +5,29 @@ from pydantic_settings import BaseSettings class Settings(BaseSettings): + # LLM access llm_base_url: str = "https://openrouter.ai/api/v1" llm_api_key: str = "" llm_model_name: str = "qwen/qwen3.5-35b-a3b" + + # Embeddings embedding_model: str = "qwen/qwen3-embedding-4b" embedding_base_url: str = "https://openrouter.ai/api/v1" + embedding_api_key: str = "" + + # ChromaDB chroma_db_path: str = "./chroma_db" + # App configuration moved to settings for easier testing/configuration + # Cross-origin settings and chunking parameters (Phase 1 plan) + cors_origins: list[str] = ["http://localhost:5173", "http://localhost:3000"] + chunk_size: int = 1000 + chunk_overlap: int = 200 + retrieval_n_results: int = 10 + relevance_threshold: float = 7.0 + llm_timeout: float = 60.0 + + # Development helpers model_config = {"env_file": ".env", "env_file_encoding": "utf-8"} diff --git a/backend/pytest.ini b/backend/pytest.ini index daf5832..5d6f170 100644 --- a/backend/pytest.ini +++ b/backend/pytest.ini @@ -1,5 +1,5 @@ [pytest] +asyncio_mode = auto markers = acceptance: Acceptance tests with real external services (LLM, ASR, ChromaDB) slow: Tests that take longer than 1 second - asyncio_mode = auto