mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
azure openai o3-mini expecting stream response but sete stream false in request. #72
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ufo009e on GitHub (Mar 12, 2025).
Self Checks
Dify version
1.0.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I installed azure openai plugin 0.0.8, when using o3-mini modle, stream always set to false in http request, but the plugin is expecting stream response.
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
@dosubot[bot] commented on GitHub (Mar 12, 2025):
I found a similar discussion thread titled "azure openai api Stream options setting" which is currently unsolved [1].
Regarding your issue, the
TypeErrorin the_handle_invoke_result_streammethod suggests thatresult.delta.message.contentis a list, but the code is attempting to concatenate it as if it were a string. To resolve this, ensure thatresult.delta.message.contentis indeed a string before concatenating it. You might need to convert or join the list elements into a string format.Additionally, the
streamparameter in the HTTP request is set based on theresponse_mode. Ifresponse_modeis "streaming",streamshould be set toTrue; otherwise, it is set toFalse <sup>[[2]](https://github.com/langgenius/dify/blob/main/sdks/python-client/dify_client/client.py)</sup><sup>[[3]](https://github.com/langgenius/dify/blob/main/sdks/nodejs-client/index.js)</sup>. Ensure that theresponse_modeis correctly set to "streaming" if a stream response is expected.To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
@kurokobo commented on GitHub (Mar 13, 2025):
This can be splitted into two issues:
stream: falsestream: false, the message content is[]instead of"", which causes aTypeError: can only concatenate str (not "list") to str.