To make it short: Is there any way to use the structured output Parser together with the Streaming API cause the way I use it, it tries to Structure the Output for every snippet so to speek whcih leads to a "Max iterations (10) reached. The agent could not complete the task within the allowed number of iterations.
" error
The issue here is that the Structured Output Parser is trying to parse each streaming chunk individually, which causes it to hit the iteration limit. To fix this:
1. Disable streaming in the OpenAI node
2. Use the Structured Output Parser on the complete response
3. If you need streaming, implement custom logic to buffer chunks until complete before parsing
This approach ensures the parser only runs once on the full response. Let me know if you need help implementing the buffering logic!