guys when I run this code below, I don’t get any output from agent. It just shows the following things at the bottom. But If I run this with OpenAI. It shows no error.
from langchain import hub
from langchain.agents import AgentExecutor, create_react_agent, load_tools
from langchain_community.chat_models import ChatOpenAI
from langchain import OpenAI
from langchain_core.output_parsers import StrOutputParser
from langchain_community.llms import HuggingFaceHub
llm = HuggingFaceHub(
repo_id="mistralai/Mixtral-8x7B-Instruct-v0.1",
task="text-generation",
model_kwargs={
"max_new_tokens": 512,
"top_k": 30,
"temperature": 0.1,
"repetition_penalty": 1.03,
},
)
tools = load_tools(
["arxiv"],
)
prompt = hub.pull("hwchase17/react")
agent = create_react_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True,handle_parsing_errors=True)
agent_executor.invoke(
{
"input": "what is the impact of artificial intelligence on devops? ",
}
)
Entering new AgentExecutor chain… Answer the following questions as
best you can. You have access to the following tools:arxiv: A wrapper around Arxiv.org Useful for when you need to answer
questions about Physics, Mathematics, Computer Science, Quantitative
Biology, Quantitative Finance, Statistics, Electrical Engineering, and
Economics from scientific articles on arxiv.org. Input should be a
search query.Use the following format:
Question: the input question you must answer Thought: you should
always think about what to do Action: the action to take, should be
one of [arxiv] Action Input: the input to the actionthe action to
take, should be one of [arxiv] is not a valid tool, try one of
[arxiv].Answer the following questions as best you can. You have
access to the following tools: