fix for merge error (#3814)

This commit is contained in:
joachim-danswer
2025-01-29 08:53:00 -08:00
committed by Evan Lohn
parent 91b929d466
commit ff4df6f3bf

View File

@ -98,6 +98,26 @@ def generate_initial_answer(
decomp_questions = [] decomp_questions = []
if len(relevant_docs) == 0:
dispatch_custom_event(
"initial_agent_answer",
AgentAnswerPiece(
answer_piece=UNKNOWN_ANSWER,
level=0,
level_question_nr=0,
answer_type="agent_level_answer",
),
)
dispatch_main_answer_stop_info(0)
answer = UNKNOWN_ANSWER
initial_agent_stats = InitialAgentResultStats(
sub_questions={},
original_question={},
agent_effectiveness={},
)
else:
# Use the query info from the base document retrieval # Use the query info from the base document retrieval
query_info = get_query_info(state.original_question_retrieval_results) query_info = get_query_info(state.original_question_retrieval_results)
if agent_a_config.search_tool is None: if agent_a_config.search_tool is None:
@ -120,26 +140,6 @@ def generate_initial_answer(
), ),
) )
if len(relevant_docs) == 0:
dispatch_custom_event(
"initial_agent_answer",
AgentAnswerPiece(
answer_piece=UNKNOWN_ANSWER,
level=0,
level_question_nr=0,
answer_type="agent_level_answer",
),
)
dispatch_main_answer_stop_info(0)
answer = UNKNOWN_ANSWER
initial_agent_stats = InitialAgentResultStats(
sub_questions={},
original_question={},
agent_effectiveness={},
)
else:
decomp_answer_results = state.decomp_answer_results decomp_answer_results = state.decomp_answer_results
good_qa_list: list[str] = [] good_qa_list: list[str] = []