优化意图识别逻辑,注释掉槽位填充的条件判断,并更新问题列表的处理方式,
This commit is contained in:
@@ -445,8 +445,8 @@ class AsyncIntentRecognizer:
|
||||
# 步骤4: 进行槽位填充
|
||||
# 如果是有效分类,进行槽位填充
|
||||
slot_filling_result = {}
|
||||
if classification.vertical_classification not in ["其他", "闲聊"] and classification.sub_classification not in ["其他", "闲聊"]:
|
||||
slot_filling_result = await self._fill_slots_async(rewrite.rewrite, classification, conversation_context, chat_history, previous_slots)
|
||||
# if classification.vertical_classification not in ["其他", "闲聊"] and classification.sub_classification not in ["其他", "闲聊"]:
|
||||
# slot_filling_result = await self._fill_slots_async(rewrite.rewrite, classification, conversation_context, chat_history, previous_slots)
|
||||
|
||||
if not enable_query_expansion:
|
||||
return {
|
||||
@@ -471,7 +471,8 @@ class AsyncIntentRecognizer:
|
||||
|
||||
all_questions = multi_questions_result.sub_questions
|
||||
all_questions.append(query)
|
||||
all_questions.append(step_back_result.step_back_query)
|
||||
all_questions.append(rewrite.rewrite)
|
||||
all_questions.extend(step_back_result.step_back_query)
|
||||
all_questions.append(follow_up_result.follow_up_query)
|
||||
all_questions.append(hyde_result.hypothetical_answer)
|
||||
all_questions = list(set(all_questions))
|
||||
|
||||
Reference in New Issue
Block a user