修复意图识别中的同义词处理逻辑,确保同义词字符串正确分割为列表;更新提示模板,明确输出要求,避免对关键词的误解和修改。

This commit is contained in:
2025-06-03 17:45:32 +08:00
parent 74938607a7
commit b519f92087
2 changed files with 4 additions and 1 deletions
@@ -210,6 +210,8 @@ class IntentRecognizer:
current_key_terms = set()
# 添加向量检索结果
for result in vector_results:
if isinstance(result.get('synonymous', []), str):
result['synonymous'] = result['synonymous'].split(';')
term = Term(
name=result.get('name'),
synonymous=result.get('synonymous', []),