functional search and chat once again!

This commit is contained in:
pablodanswer 2024-09-15 12:20:35 -07:00
parent 1285b2f4d4
commit 875fb05dca

View File

@ -338,6 +338,7 @@ class Answer:
self._update_prompt_builder_for_search_tool(prompt_builder, [])
elif tool.name == ImageGenerationTool._NAME:
print("\n----\nUpdating image prompt user message\n----\n")
img_urls = [
img_generation_result["url"]
for img_generation_result in tool_runner.tool_final_result().tool_result
@ -348,6 +349,8 @@ class Answer:
)
)
print("now stremign wie fianl results")
yield tool_runner.tool_final_result()
# Update message history with tool call and response
@ -386,6 +389,8 @@ class Answer:
)
)
print("\n----\nBuilding final prompt with Tool call summary\n----\n")
# Generate response based on updated message history
prompt = prompt_builder.build(tool_call_summary=tool_call_summary)