Antoine101 commited on
Commit
af418c7
·
verified ·
1 Parent(s): 1ee6c52

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +2 -1
tools.py CHANGED
@@ -2,10 +2,11 @@ from langchain_community.retrievers import BM25Retriever
2
  from langchain.tools import Tool
3
  from langchain_community.tools import DuckDuckGoSearchRun
4
  from langchain_community.document_loaders.wikipedia import WikipediaLoader
5
-
6
 
7
  search_tool = DuckDuckGoSearchRun()
8
 
 
9
  def wiki_loader(query: str, lang: str='en', load_max_docs: int=2):
10
  """
11
  Fetches content from Wikipedia based on a given query.
 
2
  from langchain.tools import Tool
3
  from langchain_community.tools import DuckDuckGoSearchRun
4
  from langchain_community.document_loaders.wikipedia import WikipediaLoader
5
+ from langchain_core.tools import tool
6
 
7
  search_tool = DuckDuckGoSearchRun()
8
 
9
+ @tool
10
  def wiki_loader(query: str, lang: str='en', load_max_docs: int=2):
11
  """
12
  Fetches content from Wikipedia based on a given query.