Configuration¶
DualLens Analytics uses a two-layer configuration system:
- Secrets – loaded from
.envviapython-dotenv - Application parameters – loaded from
conf/config.yamlvia Hydra / OmegaConf
Environment Variables (.env)¶
| Variable | Required | Description |
|---|---|---|
API_KEY |
Yes | OpenAI-compatible API key |
OPENAI_API_BASE |
Yes | Base URL for the LLM endpoint |
Warning
Never commit .env to version control. It is listed in .gitignore.
Hydra Config (conf/config.yaml)¶
The YAML file is divided into logical sections:
LLM¶
Embedding¶
Chunking¶
Controls how PDF documents are split before embedding:
Retriever¶
Vector Store¶
Companies & Financial¶
companies:
- Google
- Microsoft
- Amazon
- Meta
stock:
period: 1y
financial_metrics:
- revenue
- market_cap
- total_debt
- free_cash_flow
- operating_income
Overriding via CLI (Hydra)¶
Any config value can be overridden from the command line:
See the Hydra documentation for advanced override syntax.