"Agent stopped due to max iterations."
In the terminal:
Entering new agent_executor chain...
This is not a math question.
Action: None
Action Input: None
This is a question that requires a response.
Action: None
Action Input: None
I should provide a response.
Action: None
Action Input: None
I should provide a response with words.
Action: None
Action Input: None
I should provide a response with words that express how I am feeling.
Action: None
Action Input: None
I should provide a response with words that express how I am feeling in a positive way.
Action: None
Action Input: None
I should provide a response with words that express how I am feeling in a positive way.
Action: None
Action Input: None
I should provide a response with words that express how I am feeling in a positive way.
Action: None
Action Input: None
I should provide a response with words that express how I am feeling in a positive way.
Action: None
Action Input: None
I should provide a response with words that express how I am feeling in a positive way.
Action: None
Action Input: None
I should provide a response with words that express how I am feeling in a positive way.
Action: None
Action Input: None
I should provide a response with words that express how I am feeling in a positive way.
Action: None
Action Input: None
I should provide a response with words that express how I am feeling in a positive way.
Action: None
Action Input: None
I should provide a response with words that express how I am feeling in a positive way.
Action: None
Action Input: None
I should provide a response with words that express how I am feeling in a positive way.
Action: None
Action Input: None
Finished chain.
This is expected as the the question is not related to math. If you ask math related question like what is 2 plus 2, that'll work. It's Langchain implementation
Ohh I thought agents decide what's best to use? If you ask a question that the tool can use, the agent uses the tool, otherwise it'll use openai?
For MRKL agent, user chat message has to related to the tools.
If you want to have the agent to use openai to answer general question that is not related to tools, and also has the ability to use the tools when question is related to tools, like below:

Use Chat Model and ConversationalAgent. There is a template named Conversational Agent in the marketplace where you can use straight-away
Thanks!
Hmm not having much luck, any ideas?
Eventually it shows "Request failed with status code 400" in the page.
Terminal just shows Entering new agent_executor chain... and nothing else.
Not sure if it is a good idea to hijack this issue, but I'm just getting the same message. I'm trying to follow calling-children-flows example but with "ChatOllama Functions" node. It goes crazy with a simple calculator tool.
I can see the Calculator tool is being called and responding it right at odd times and is being called with empty argument at even times. So, what is going wrong here? Can it be done with local Ollama?
Flow:
Lang Smith AgentExecutor Raw Output:
{
"output": "Agent stopped due to max iterations.",
"usedTools": [
{
"tool": "calculator",
"toolInput": {
"input": "2+3"
},
"toolOutput": "5"
},
{
"tool": "calculator",
"toolInput": {
"input": "2+3"
},
"toolOutput": "5"
},
{
"tool": "calculator",
"toolInput": {
"input": "2+3"
},
"toolOutput": "5"
},
{
"tool": "calculator",
"toolInput": {
"input": "2+3"
},
"toolOutput": "5"
},
{
"tool": "calculator",
"toolInput": {},
"toolOutput": "I don't know how to do that."
},
{
"tool": "calculator",
"toolInput": {
"input": "2+3"
},
"toolOutput": "5"
},
{
"tool": "calculator",
"toolInput": {},
"toolOutput": "I don't know how to do that."
},
{
"tool": "calculator",
"toolInput": {
"input": "2+3"
},
"toolOutput": "5"
},
{
"tool": "calculator",
"toolInput": {
"input": "2+3"
},
"toolOutput": "5"
},
{
"tool": "calculator",
"toolInput": {},
"toolOutput": "I don't know how to do that."
},
{
"tool": "calculator",
"toolInput": {
"input": "2+3"
},
"toolOutput": "5"
},
{
"tool": "calculator",
"toolInput": {},
"toolOutput": "I don't know how to do that."
},
{
"tool": "calculator",
"toolInput": {
"input": "2+3"
},
"toolOutput": "5"
},
{
"tool": "calculator",
"toolInput": {},
"toolOutput": "I don't know how to do that."
},
{
"tool": "calculator",
"toolInput": {
"input": "2+3"
},
"toolOutput": "5"
}
]
}