Spaces:
Sleeping
Sleeping
File size: 332 Bytes
fb58427 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from langchain_community.tools import WikipediaQueryRun
from langchain_community.utilities import WikipediaAPIWrapper
class WikipediaSearcher:
def __init__(self):
self.wikipedia = WikipediaQueryRun(api_wrapper=WikipediaAPIWrapper())
def search(self, query: str) -> str:
return self.wikipedia.run(query)
|