42025da0b0
The owner's DeBERTa-v3-small two-head ONNX model (golden set 72/78, ~72% agreement with DeepSeek on unseen days) replaces DeepSeek for headline scoring. DeepSeek keeps event direction, the summary and the dashboard endpoint. - news_model.py: vendored ML-NEWS runtime (lazy onnxruntime/tokenizers, so the bot starts without them) + load-once, never-raising singleton. - news_engine: _enrich_headline_scores mode switch (off/fallback/primary), _apply_model_sentiment (gold head only: xau_score + XAU entry, never USD; not-relevant shows 0.0; never touches _llm_sent_cache), _audit_with_deepseek (archive-only labels, deepseek_audit_per_day). - Owner decision: primary mode writes nothing to logs/newsdata.db except audit copies — the model's output is not training data. - app_config: news_model section (path/threads/mode/deepseek_audit_per_day) + NEWS_MODEL_MODE env override; validated at boot. - news_archive: model rows carry teacher_model xau_transformer@<trained_at>. - deploy/README-news-model.md (ops for bot + dashboard daemon), unit gets a commented NEWS_MODEL_MODE=off line; requirements + onnxruntime, tokenizers. - test_all.py Module 38 (15 tests, one against the real bundle). Suite 581. - CLAUDE.md, spec status note, handoff marked implemented. Books unaffected: news never enters signals; no signal file touched.
76 lines
1.8 KiB
JSON
76 lines
1.8 KiB
JSON
{
|
|
"telegram": {
|
|
"token": "123456789:REPLACE_WITH_YOUR_BOT_TOKEN",
|
|
"chat_id": "REPLACE_WITH_OWNER_CHAT_ID",
|
|
"channel_id": "-100REPLACE_WITH_CHANNEL_ID_OR_EMPTY_STRING",
|
|
"alert_min_quality": "C"
|
|
},
|
|
"data_providers": {
|
|
"active": "oanda",
|
|
"streaming": "tiingo",
|
|
"twelve_data": {
|
|
"api_key": "REPLACE_WITH_YOUR_TWELVE_DATA_API_KEY"
|
|
},
|
|
"oanda": {},
|
|
"tiingo": {
|
|
"api_key": "REPLACE_WITH_YOUR_TIINGO_API_KEY_OR_EMPTY"
|
|
}
|
|
},
|
|
"scanning": {
|
|
"pairs": ["XAU/USD"],
|
|
"timeframes": ["M5", "M15", "H1", "H4"]
|
|
},
|
|
"pairs": {
|
|
"XAU/USD": {
|
|
"blocked_hours_utc": [0, 1, 2, 10, 11, 13, 16, 21]
|
|
}
|
|
},
|
|
"oanda": {
|
|
"api_token": "REPLACE_WITH_API_TOKEN",
|
|
"base_url": "https://api-fxpractice.oanda.com"
|
|
},
|
|
"deepseek": {
|
|
"api_key": "REPLACE_WITH_YOUR_DEEPSEEK_API_KEY_OR_EMPTY",
|
|
"model": "deepseek-v4-flash",
|
|
"enabled": true,
|
|
"timeout_seconds": 12,
|
|
"daily_request_cap": 500
|
|
},
|
|
"agent_panel": {
|
|
"enabled": false,
|
|
"telegram": true,
|
|
"dashboard": false,
|
|
"min_quality": "B",
|
|
"max_panels_per_day": 20,
|
|
"reuse_ttl_seconds": 3600,
|
|
"candles_enabled": true,
|
|
"candle_bars_primary": 20,
|
|
"candle_bars_confirm": 10,
|
|
"verdict_source": "mean",
|
|
"personas": ["macro"]
|
|
},
|
|
"violent_watch": {
|
|
"enabled": false,
|
|
"alert_line": true,
|
|
"headsup": true,
|
|
"max_headsup_per_day": 12,
|
|
"headsup_min_level": "hot"
|
|
},
|
|
"signal_log": {
|
|
"enabled": true,
|
|
"path": "logs/signals.db",
|
|
"log_blocked_scans": true
|
|
},
|
|
"news_archive": {
|
|
"enabled": true,
|
|
"path": "logs/newsdata.db"
|
|
},
|
|
"news_model": {
|
|
"path": "/home/Forex/models/xau_transformer",
|
|
"threads": 4,
|
|
"mode": "off",
|
|
"deepseek_audit_per_day": 0
|
|
},
|
|
"log_level": "INFO"
|
|
}
|