FlowiseAI / Flowise

Drag & drop UI to build your customized LLM flow
https://flowiseai.com
Apache License 2.0
29.8k stars 15.35k forks source link

[BUG] Cannot read properties of undefined (reading 'toLowerCase') - Worker Agent #2868

Closed TopAgrume closed 1 month ago

TopAgrume commented 1 month ago

I'm having trouble with the Flowise Worker. This error occasionally appears (non-deterministically) when I run a multi-agent flow (Supervisor/Workers).

In the case where I don't provide any Tool to my worker (which doesn't need one), this error appears every time. To mitigate the problem, I tried adding an unnecessary tool (calculator), which resolves it for a short time before the error reoccurs. Refreshing the connection between the Tool and the Worker is sometimes not enough

Another issue of this type was closed without being resolved: See: #2314

Here is my AgentFow: image

Here is what is displayed in the Chat: image

Here is what is displayed in LangSmith: image

Feel free to let me know if you need any adjustments or additional details included.

HenryHengZJ commented 1 month ago

thanks for the error message. It happens randomly because LLM failed to output the tool name, hence causing this line to return error: image

HenryHengZJ commented 1 month ago

Opened a bugfix PR to avoid returning error, however the root cause is still there, LLM is not able output the tool name correctly

NicolasCampana commented 1 month ago

@HenryHengZJ I'm having the same problem. But on tool node/agent from sequential agents. If I remove or duplicate the node, it works. Very randomly.