andrewliew86 commited on
Commit
6f6188e
·
verified ·
1 Parent(s): d8b0504

Added wikiquotes tool

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -4,18 +4,18 @@ import requests
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
- from duckduckgo_search import DDGS
8
 
9
  from Gradio_UI import GradioUI
10
 
11
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
12
  @tool
13
- def duckduckgo_search_tool(text_search_string:str)-> str:
14
- """A tool for performing internet searches with DuckDuckGo
15
  Args:
16
- text_search_string: the first argument
17
  """
18
- results = DDGS().text(text_search_string)
19
 
20
  return results
21
 
 
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
+ import wikiquotes
8
 
9
  from Gradio_UI import GradioUI
10
 
11
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
12
  @tool
13
+ def wikiquotes_quotes(person_name:str)-> str:
14
+ """A tool for getting quotes from the wikiquotes database
15
  Args:
16
+ person_name: Name of the person to get quote from
17
  """
18
+ results = wikiquotes.search(person_name)
19
 
20
  return results
21