fix: restore main runtime sources and cache consistency
This commit is contained in:
@@ -316,8 +316,8 @@ class IntentAnalyzer:
|
||||
|
||||
if cache_emb is not None:
|
||||
cached = cache.get(cache_emb)
|
||||
# 确保缓存条目是意图分析结果(非 RAG 回答缓存)
|
||||
if cached and cached.get("cache_type") != "rag_answer":
|
||||
# 仅接受明确标记的意图缓存,避免未来新增缓存类型时交叉命中。
|
||||
if cached and cached.get("cache_type") == "intent_analysis":
|
||||
logger.info(f"意图分析缓存命中: {cached.get('reason', '')[:50]}")
|
||||
return IntentAnalysis.from_dict(cached)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user