Spaces:
Sleeping
Sleeping
Update wikipediaLookup.py
Browse files- wikipediaLookup.py +9 -1
wikipediaLookup.py
CHANGED
@@ -5,7 +5,15 @@ import wikipedia
|
|
5 |
class WikipediaLookupTool(Tool):
|
6 |
name = "wikipedia_lookup"
|
7 |
description = "Look up content from the English Wikipedia based on a query string."
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
def __call__(self, query: str) -> str:
|
10 |
try:
|
11 |
page = wikipedia.page(query)
|
|
|
5 |
class WikipediaLookupTool(Tool):
|
6 |
name = "wikipedia_lookup"
|
7 |
description = "Look up content from the English Wikipedia based on a query string."
|
8 |
+
inputs = {
|
9 |
+
'query': {
|
10 |
+
'type': 'string',
|
11 |
+
'description': 'The search term to look up on Wikipedia.'
|
12 |
+
}
|
13 |
+
}
|
14 |
+
output_type = "string"
|
15 |
+
|
16 |
+
|
17 |
def __call__(self, query: str) -> str:
|
18 |
try:
|
19 |
page = wikipedia.page(query)
|