Spaces:
Sleeping
Sleeping
junlin3
commited on
Commit
·
87d766a
1
Parent(s):
36ab5f6
fix bug
Browse files
agent.py
CHANGED
@@ -102,7 +102,7 @@ def web_search(query: str) -> str:
|
|
102 |
search_docs = TavilySearchResults(max_results=3).invoke(query)
|
103 |
formatted_search_docs = '\n\n---\n\n'.join(
|
104 |
[
|
105 |
-
f'<Document source="{doc["url"]}" page="{doc.get("title", "")}">\n{doc.get(
|
106 |
]
|
107 |
)
|
108 |
return {'web_results': formatted_search_docs}
|
|
|
102 |
search_docs = TavilySearchResults(max_results=3).invoke(query)
|
103 |
formatted_search_docs = '\n\n---\n\n'.join(
|
104 |
[
|
105 |
+
f'<Document source="{doc["url"]}" page="{doc.get("title", "")}">\n{doc.get("content", "")}\n</Document>' for doc in search_docs
|
106 |
]
|
107 |
)
|
108 |
return {'web_results': formatted_search_docs}
|