Replies: 1 comment
-
|
@ajunca If your local model (via LocalAI or another OpenAI-compatible server) is emitting reasoning tags as part of the response, the Condition Agent will see them as part of the model output. Since the Condition Agent evaluates the preceding node's response, those tags can interfere with condition matching or structured output. :contentReference[oaicite:0]{index=0} From what I can tell, I couldn't find a Flowise setting that automatically strips A few options:1. Disable reasoning/thinking in the model (Recommended)Many local reasoning models have a way to disable "thinking" or switch to a non-reasoning mode. If your LocalAI backend or the underlying model supports this, that's the cleanest solution because the tags are never generated. The exact configuration depends on the model you're using. 2. Add a post-processing stepIf you need the model but not the reasoning output, insert a processing step between the LLM and the Condition Agent to remove the tags. For example, a simple regex would be: response.replace(/<think>[\s\S]*?<\/think>/g, '').trim()This leaves only the final answer for the Condition Agent to evaluate. 3. Use structured output for routingIf your Condition Agent is making routing decisions, consider having the previous LLM return structured output (e.g. JSON or a fixed field) instead of relying on free-form text. This is generally more robust than parsing natural language responses. Flowise's Condition Agent supports evaluating structured outputs and conditions rather than only raw text. :contentReference[oaicite:1]{index=1} One questionWhich local backend are you using?
Also, which model is producing the Some models expose reasoning by design, while others allow it to be disabled through provider-specific parameters. Knowing the backend and model will help determine whether the tags can be disabled at the source or should be stripped in the Flowise pipeline. If this solves your problem, feel free to mark it as the accepted answer so others can find it easily. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using a "ChatLocalAI" that outputs
<think></think>. The problem is that "Condition Agent" does not work with think. Is there anyway to post-process and remove the thinking?Beta Was this translation helpful? Give feedback.
All reactions