Commit 9269ed4f by m0hammadjaan

Root

parent 06a33cc8
...@@ -5,6 +5,7 @@ from langchain.chat_models import ChatOpenAI ...@@ -5,6 +5,7 @@ from langchain.chat_models import ChatOpenAI
from langchain.tools import DuckDuckGoSearchRun from langchain.tools import DuckDuckGoSearchRun
from langchain.agents import initialize_agent, Tool from langchain.agents import initialize_agent, Tool
from langchain.callbacks import StreamlitCallbackHandler from langchain.callbacks import StreamlitCallbackHandler
from langchain.utilities import ArxivAPIWrapper from langchain.utilities import ArxivAPIWrapper
...@@ -22,17 +23,11 @@ class ChatbotTools: ...@@ -22,17 +23,11 @@ class ChatbotTools:
def setup_agent(self): def setup_agent(self):
# Define tool # Define tool
ddg_search = DuckDuckGoSearchRun() ddg_search = DuckDuckGoSearchRun()
arxiv = ArxivAPIWrapper()
tools = [ tools = [
Tool( Tool(
name="DuckDuckGoSearch", name="DuckDuckGoSearch",
func=ddg_search.run, func=ddg_search.run,
description="Useful for when you need to answer questions about current events. You should ask targeted questions", description="Useful for when you need to answer questions about current events. You should ask targeted questions",
),
Tool(
name="Arxiv",
func=arxiv.run,
description="Useful for when you need to answer questions about research papers, scientific articles, and preprints etc",
) )
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment