diff --git a/services/hermes_analyst_service.py b/services/hermes_analyst_service.py index 09930bd..29870e0 100644 --- a/services/hermes_analyst_service.py +++ b/services/hermes_analyst_service.py @@ -4,7 +4,7 @@ Hermes 3 競價情報分析服務 (Module 2) 角色:分析師 (Analyst) -模型:qwen2.5:7b-instruct @ 192.168.0.188:11434 +模型:qwen2.5:7b-instruct @ 192.168.0.111:11434 輸入:SQL 漏斗篩選後的候選商品(~300筆) 輸出:Top N 威脅清單(結構化 JSON)→ 交給 NemoTron dispatcher diff --git a/services/nemoton_dispatcher_service.py b/services/nemoton_dispatcher_service.py index af96f71..8d19b5e 100644 --- a/services/nemoton_dispatcher_service.py +++ b/services/nemoton_dispatcher_service.py @@ -284,7 +284,7 @@ def _build_footprint_json(hermes_stats: Optional[dict], nim_stats: Optional[dict if hermes_stats: result["analyst"] = { "model": "qwen2.5:7b-instruct", - "host": "192.168.0.188", + "host": os.getenv("HERMES_URL", "http://192.168.0.111:11434"), "duration_sec": hermes_stats.get("duration_sec", 0), "tokens": hermes_stats.get("tokens", 0), "cost_usd": 0, @@ -363,7 +363,8 @@ class NemotronDispatcher: nim_stats: {"total_tokens": int, "quota_used": int} """ if not NIM_API_KEY: - raise RuntimeError("NVIDIA_API_KEY 未設定") + logger.warning("[NemotronDispatcher] NVIDIA_API_KEY 未設定,跳過 NIM 呼叫") + return [], {} threat_summary = json.dumps( [