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

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +4 -2
tools.py CHANGED
@@ -37,7 +37,8 @@ class WikipediaTool(Tool):
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):
@@ -46,7 +47,8 @@ class WikipediaSearchTool(Tool):
46
  inputs = {"query": "string"}
47
  output_type = "string"
48
 
49
- def __call__(self, query: str) -> str:
 
50
  return search_wikipedia(query)
51
 
52
 
 
37
  inputs = {"query": "string"}
38
  output_type = "string"
39
 
40
+ def __call__(self, inputs: dict) -> str:
41
+ query = inputs["query"]
42
  return fetch_wikipedia_article(query)
43
 
44
  class WikipediaSearchTool(Tool):
 
47
  inputs = {"query": "string"}
48
  output_type = "string"
49
 
50
+ def __call__(self, inputs: dict) -> str:
51
+ query = inputs["query"]
52
  return search_wikipedia(query)
53
 
54