fix: ElephantAlpha crash, AiderHeal Ollama host, MCP integration for Hermes/NemoTron, and MCP hallucination
All checks were successful
CD Pipeline / deploy (push) Successful in 1m18s

This commit is contained in:
OoO
2026-04-28 12:11:33 +08:00
parent 30fc7609df
commit bc7113bc86
5 changed files with 46 additions and 29 deletions

View File

@@ -22,6 +22,7 @@ from typing import Optional
import requests
from sqlalchemy import text
from services.mcp_context_service import build_mcp_context
logger = logging.getLogger(__name__)
@@ -382,7 +383,10 @@ class HermesAnalystService:
if not items:
return [], []
mcp_ctx = build_mcp_context(topics=["market_trends", "holiday_calendar", "seasonal_insights"])
prompt = (
f"【市場外部情報 (MCP)】\n{mcp_ctx}\n\n"
f"分析以下 {len(items)} 支商品的競價威脅,回傳前 {TOP_N} 個最高風險商品。\n\n"
f"資料:{json.dumps(items, ensure_ascii=False)}\n\n"
f"輸出格式JSON 陣列,每筆含):\n"