feat: load k8s news prompts from env/files, not Python
Bundled MAP_PROMPT/SUMMARY_PROMPT from the customer1 deepseek configmap. Env wins over prompt files; blank compose injection is treated as unset. Parser maps market_overview JSON onto the dashboard ticker/map contract.
This commit is contained in:
parent
c10b617f1f
commit
1c47ecbc5a
11 changed files with 444 additions and 73 deletions
19
docs/news.md
19
docs/news.md
|
|
@ -258,11 +258,20 @@ No Hermes-4 reasoning system prompt. Reduce uses `json_mode=True`.
|
|||
|
||||
## Prompts
|
||||
|
||||
Both prompts are env-overridable — the default `MAP_PROMPT` is OSINT-neutral
|
||||
(facts, locations, entities, category, OSINT signal per article; English) and
|
||||
the default `SUMMARY_PROMPT` demands the reduce JSON above (with a
|
||||
"no qualifying events" escape hatch). Upstream's futures/markets prompt
|
||||
language is gated behind `INCLUDE_FUTURES=1`.
|
||||
Map/reduce prompts are the k8s `deepseek-configmap` text in
|
||||
`news/summerizer/prompt_files/{map,summary}.txt` — **not** hardcoded in
|
||||
Python. Resolution order: `MAP_PROMPT` / `SUMMARY_PROMPT` env (non-blank
|
||||
wins) → `MAP_PROMPT_FILE` / `SUMMARY_PROMPT_FILE` → bundled files.
|
||||
|
||||
Compose passes `${MAP_PROMPT:-}` so a host `.env` swap takes effect on
|
||||
container recreate (no image rebuild). Blank env is treated as unset.
|
||||
|
||||
The reduce JSON is the market-intel schema (`market_overview` +
|
||||
`geopolitical_osint`). `intel.parse_reduce_json` maps it onto the dashboard
|
||||
`summary_en` / ticker / map_items contract. Additive `lat`/`lon` on
|
||||
`critical_events` and `active_conflicts` feed Critical News pins.
|
||||
|
||||
Upstream's futures/markets tape is gated behind `INCLUDE_FUTURES=1`.
|
||||
|
||||
## Tests
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue