WeByT3 commited on
Commit
4d3f295
·
verified ·
1 Parent(s): 64e0a97

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +3 -2
tools.py CHANGED
@@ -59,11 +59,12 @@ def wikipedia_search_tool(query: str) -> str:
59
  query: The query to search in wikipedia
60
 
61
  Example:
62
- wikipedia_search_tool("How many albums did the Beatles produce between 1965 and 1968?")
 
63
  """
64
  try:
65
  page_title = wikipedia.search(query)[0]
66
  summary = wikipedia.summary(page_title, sentences=5)
67
- return f"Page Title: {page_title}\n\n{summary}"
68
  except Exception as e:
69
  return f"Error: {str(e)}"
 
59
  query: The query to search in wikipedia
60
 
61
  Example:
62
+ {"message": "How many albums did the Beatles produce between 1965 and 1968?"}
63
+ wikipedia_search_tool("The Beatles")
64
  """
65
  try:
66
  page_title = wikipedia.search(query)[0]
67
  summary = wikipedia.summary(page_title, sentences=5)
68
+ return f"Title: {page.title}\n\n{page.content}"
69
  except Exception as e:
70
  return f"Error: {str(e)}"