mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-05 20:49:48 +02:00
Fix search tool
This commit is contained in:
parent
43557f738b
commit
062dc98719
@ -120,7 +120,9 @@ class SearchTool(Tool):
|
|||||||
def build_tool_message_content(
|
def build_tool_message_content(
|
||||||
self, *args: ToolResponse
|
self, *args: ToolResponse
|
||||||
) -> str | list[str | dict[str, Any]]:
|
) -> str | list[str | dict[str, Any]]:
|
||||||
final_context_docs_response = args[2]
|
final_context_docs_response = next(
|
||||||
|
response for response in args if response.id == FINAL_CONTEXT_DOCUMENTS
|
||||||
|
)
|
||||||
final_context_docs = cast(list[LlmDoc], final_context_docs_response.response)
|
final_context_docs = cast(list[LlmDoc], final_context_docs_response.response)
|
||||||
|
|
||||||
return json.dumps(
|
return json.dumps(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user