mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Set failed response message when a research iteration fails.
Previously summarizedResult would be unset when a tool call failed. This caused research to fail due to ChatMessageModel failures when constructing tool chat histories and would have caused similar errors in other constructed chat histories. Putting a failed iteration message in the summary prevents that while letting the research agent continue its research.
This commit is contained in:
@@ -499,5 +499,6 @@ async def research(
|
||||
# intermediate_result = await extract_relevant_info(this_iteration.query, results_data, agent)
|
||||
this_iteration.summarizedResult = results_data
|
||||
|
||||
this_iteration.summarizedResult = this_iteration.summarizedResult or "Failed to get results."
|
||||
previous_iterations.append(this_iteration)
|
||||
yield this_iteration
|
||||
|
||||
Reference in New Issue
Block a user