-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
38 lines (29 loc) · 1.42 KB
/
Copy pathconfig.py
File metadata and controls
38 lines (29 loc) · 1.42 KB
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
32
33
34
35
36
37
38
"""Centralised, typed configuration.
Every tunable lives here so the system stays observable: one place to see
what model is used, where the index is persisted, and which document is
currently loaded. Values are read from the environment / .env file.
"""
from __future__ import annotations
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
# --- Anthropic (only used for live extraction and llm-mode answers) ---
anthropic_api_key: str = ""
# Cheapest current model — keeps credit burn minimal.
extract_model: str = "claude-haiku-4-5-20251001"
answer_model: str = "claude-haiku-4-5-20251001"
chunk_size: int = 2
chunk_overlap: int = 1
# --- Retrieval / vector store ---
chroma_path: str = ".chroma"
collection_name: str = "capital_events"
top_k: int = 5
# --- Data ---
# The extracted JSON the API loads on startup. Point this at any file
# produced by extractor.py / table extraction. Defaults to the real Ola
# Electric DRHP extraction so a cold open shows genuine, page-cited
# events (not a synthetic sample); the whole demo still runs with zero
# API spend. Override with EVENTS_PATH in .env (e.g. the broader
# fixtures/sample_events.json for full event-type coverage).
events_path: str = "fixtures/ola_drhp_extracted.json"
settings = Settings()