Spaces:
Sleeping
Sleeping
Update tools.py
Browse files
tools.py
CHANGED
|
@@ -37,7 +37,8 @@ class WikipediaTool(Tool):
|
|
| 37 |
inputs = {"query": "string"}
|
| 38 |
output_type = "string"
|
| 39 |
|
| 40 |
-
def __call__(self,
|
|
|
|
| 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,
|
|
|
|
| 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 |
|