ricardo-teixeira9 commited on
Commit
3ce4331
·
verified ·
1 Parent(s): 05c4764

Update tools.py

Browse files

fix " problem

Files changed (1) hide show
  1. tools.py +2 -2
tools.py CHANGED
@@ -44,8 +44,8 @@ def web_search(query: str) -> str:
44
  search_docs = TavilySearch(max_results=3).invoke(input=query)
45
  formatted_search_docs = "\n\n---\n\n".join(
46
  [
47
- f'<Document title="{doc["title"]}" url="{doc['url']}" confidence score="{doc["score"]}"/>\n</Document>{doc['content']}\n</Document>\n'
48
- for doc in search_docs['results']
49
  ]
50
  )
51
  return {"web_results": formatted_search_docs}
 
44
  search_docs = TavilySearch(max_results=3).invoke(input=query)
45
  formatted_search_docs = "\n\n---\n\n".join(
46
  [
47
+ f'<Document title="{doc["title"]}" url="{doc["url"]}" confidence score="{doc["score"]}"/>\n</Document>{doc["content"]}\n</Document>\n'
48
+ for doc in search_docs["results"]
49
  ]
50
  )
51
  return {"web_results": formatted_search_docs}