Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

"Agent stopped due to max iterations."

Open umaar opened this issue 3 years ago • 6 comments

image

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.

umaar avatar Apr 14 '23 17:04 umaar

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

HenryHengZJ avatar Apr 14 '23 17:04 HenryHengZJ

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?

umaar avatar Apr 14 '23 18:04 umaar

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:

screely-1681514223606

Use Chat Model and ConversationalAgent. There is a template named Conversational Agent in the marketplace where you can use straight-away

HenryHengZJ avatar Apr 14 '23 23:04 HenryHengZJ

Thanks!

umaar avatar Apr 19 '23 15:04 umaar

Hmm not having much luck, any ideas?

image

Eventually it shows "Request failed with status code 400" in the page.

Terminal just shows Entering new agent_executor chain... and nothing else.

umaar avatar Apr 19 '23 15:04 umaar

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: Flowise-Low-code-LLM-apps-builder

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"
    }
  ]
}

EthraZa avatar Jul 10 '24 13:07 EthraZa