Hi together,
I have set up a streaming api request to a LLM and want to stream the response to the frontend, which works perfectly. However, I always get a "500 internal server error".
Now I reduced my api call and found out, that I already get the error by just simply iterating over the "stream" given by the "streaming api request" (with / without performing any action in the for-each-loop). So probably, there must be something with the stream output.
How can I catch this problem? I already tried a conditional, which should check if the stream is empty before iterating over, but this also did not work.
PS: The endpoint is configured as streaming response
PPS: When I save, the streaming output, I have no empty output or similiar (see excerpt on the screenshot).
Internal server error when iterating over the stream given by streaming api request
7 replies