fix: store_conversation signature, MCP model, and AI fallback message
All checks were successful
CD Pipeline / deploy (push) Successful in 1m18s

This commit is contained in:
OoO
2026-04-28 12:26:43 +08:00
parent 8331c15d1b
commit b766edfde2
2 changed files with 4 additions and 4 deletions

View File

@@ -4111,7 +4111,7 @@ def openclaw_answer(question: str):
if _LEARNING_ENABLED:
import threading as _thr
_thr.Thread(target=store_conversation,
args=(0, 0, question, resp.content, "ollama", []),
args=(chat_id, question, resp.content),
daemon=True).start()
return resp.content, None
else:
@@ -4212,7 +4212,7 @@ def openclaw_answer(question: str):
if _LEARNING_ENABLED:
import threading as _thr
_thr.Thread(target=store_conversation,
args=(0, 0, question, final, ",".join(used_sources), used_sources),
args=(chat_id, question, final),
daemon=True).start()
return final, None
@@ -4272,7 +4272,7 @@ def openclaw_answer(question: str):
except Exception as e:
sys_log.error(f"[FC] NIM fallback error: {e}")
return "AI 引擎暫時無法使用,請稍後再試)", None
return "AI 引擎全部異常Ollama 超時Gemini/NIM 備援亦無回應或達速率限制,請稍後再試)", None

View File

@@ -28,7 +28,7 @@ logger = logging.getLogger(__name__)
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY", "")
MCP_CACHE_TTL_HOURS = int(os.getenv("MCP_CACHE_TTL_HOURS", "24"))
MCP_MODEL = os.getenv("MCP_GEMINI_MODEL", "gemini-2.5-flash-preview-05-20")
MCP_MODEL = os.getenv("MCP_GEMINI_MODEL", "gemini-2.0-flash")
# ── 查詢主題定義 ────────────────────────────────────────────────────────────
_SEARCH_TOPICS = {