dlaima commited on
Commit
96ba707
·
verified ·
1 Parent(s): fdb2b63

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +8 -14
tools.py CHANGED
@@ -32,25 +32,19 @@ def search_wikipedia(query: str) -> str:
32
  return "No search results found."
33
 
34
  class WikipediaTool(Tool):
35
- def __init__(self):
36
- super().__init__(
37
- name="WikipediaTool",
38
- description="Fetches plain text from a Wikipedia article. Input should be the article title.",
39
- inputs={"query": "string"},
40
- output_type="string"
41
- )
42
 
43
  def __call__(self, query: str) -> str:
44
  return fetch_wikipedia_article(query)
45
 
46
  class WikipediaSearchTool(Tool):
47
- def __init__(self):
48
- super().__init__(
49
- name="WikipediaSearchTool",
50
- description="Searches Wikipedia for article titles related to a query. Input should be a question or topic.",
51
- inputs={"query": "string"},
52
- output_type="string"
53
- )
54
 
55
  def __call__(self, query: str) -> str:
56
  return search_wikipedia(query)
 
32
  return "No search results found."
33
 
34
  class WikipediaTool(Tool):
35
+ name = "WikipediaTool"
36
+ description = "Fetches plain text from a Wikipedia article. Input should be the article title."
37
+ inputs = {"query": "string"}
38
+ output_type = "string"
 
 
 
39
 
40
  def __call__(self, query: str) -> str:
41
  return fetch_wikipedia_article(query)
42
 
43
  class WikipediaSearchTool(Tool):
44
+ name = "WikipediaSearchTool"
45
+ description = "Searches Wikipedia for article titles related to a query. Input should be a question or topic."
46
+ inputs = {"query": "string"}
47
+ output_type = "string"
 
 
 
48
 
49
  def __call__(self, query: str) -> str:
50
  return search_wikipedia(query)