Commit 9269ed4f by m0hammadjaan

Root

parent 06a33cc8
......@@ -5,6 +5,7 @@ from langchain.chat_models import ChatOpenAI
from langchain.tools import DuckDuckGoSearchRun
from langchain.agents import initialize_agent, Tool
from langchain.callbacks import StreamlitCallbackHandler
from langchain.utilities import ArxivAPIWrapper
......@@ -22,17 +23,11 @@ class ChatbotTools:
def setup_agent(self):
# Define tool
ddg_search = DuckDuckGoSearchRun()
arxiv = ArxivAPIWrapper()
tools = [
Tool(
name="DuckDuckGoSearch",
func=ddg_search.run,
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