tu101 commited on
Commit
6a611b7
·
verified ·
1 Parent(s): 34f2f3e
Files changed (1) hide show
  1. tools.py +3 -3
tools.py CHANGED
@@ -58,11 +58,11 @@ wiki_search_tool = Tool(
58
  )
59
 
60
  def web_search(query: str) -> str:
61
- """Search Tavily for a query and return maximum 5 results. Make sure to format the args as query, not arg1.
62
 
63
  Args:
64
- query: The search query."""
65
- search_docs = TavilySearch(max_results=5, topic="general", include_answer=True, include_image_descriptions=True).invoke(query=query)
66
  formatted_search_docs = "\n\n---\n\n".join(
67
  [
68
  f'<Document source="{doc.metadata["source"]}" page="{doc.metadata.get("page", "")}"/>\n{doc.page_content}\n</Document>'
 
58
  )
59
 
60
  def web_search(query: str) -> str:
61
+ """Search Tavily for a query and return maximum 5 results. Make sure to format the args as query.
62
 
63
  Args:
64
+ query: The search query. The query fulfils the argument that is input."""
65
+ search_docs = TavilySearch(max_results=5, topic="general", include_answer=True, include_image_descriptions=True).invoke(input=query)
66
  formatted_search_docs = "\n\n---\n\n".join(
67
  [
68
  f'<Document source="{doc.metadata["source"]}" page="{doc.metadata.get("page", "")}"/>\n{doc.page_content}\n</Document>'