feat(chunking): add embedding model registry and ollama config

Why:
- Operators need Cloud and Local Embedding Models with stable ids, dimensions, and defaults.

Changes:
- Add Embedding Model Registry; Ollama client; env defaults for model, Ollama host, and Neighbor Expansion knobs.

Impact:
- New installs default to text-embedding-3-large; OLLAMA_BASE_URL required for Local provider.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-10 14:12:36 +03:30
parent 118255acdc
commit 5fd19c12d9
4 changed files with 175 additions and 3 deletions

View File

@@ -10,15 +10,21 @@ class Settings(BaseSettings):
# OpenAI
openai_api_key: str
embedding_model: str = "text-embedding-3-small"
embedding_model: str = "text-embedding-3-large"
llm_model: str = "gpt-4o-mini"
# Local embeddings (Ollama) — Admin switches models; host stays in config
ollama_base_url: str = "http://192.168.10.10:11435"
# Qdrant
qdrant_url: str = "http://localhost:6333"
qdrant_api_key: str | None = None
# Retrieval
top_k: int = 5
# Neighbor Expansion for fixed_size (ADR-0023); 0/0 = off
neighbor_prev: int = 0
neighbor_next: int = 0
# LLM generation
temperature: float = 0.0