I got this issue: https://github.com/Azure/azure-sdk-for-java/issues/41164 while using chat completion with stream=true on Azure OpenAI. Do you have any workarounds? Thank you!
Comment From: markpollack
If it is in the Azure SDK (which appears to be the case) we will need to wait until there is a fix there. I can't think of a workaround. Perhaps you can @tzolov ?
Comment From: markpollack
We are looking into this now.
Comment From: maxhov
@markpollack I see this is marked as completed, but I am still getting the issues mentioned here on 1.0.0-M3 and in https://github.com/Azure/azure-sdk-for-java/issues/41164 (and the issue is still open). Was this closed because it is an upstream issue?
Comment From: sobychacko
I believe this issue was occurring due to the regular OpenAiClient
in Azure SDK. We switched to using the AsyncOpenAiClient
for the streaming scenario. See this commit: https://github.com/spring-projects/spring-ai/commit/ef3d43ca9cd5c24b34af1c4d536eb2c522c998bb. Because the underlying client is changed for streaming, you should no longer see the superfluous error message thrown on the console.
Comment From: maxhov
Indeed, I can see that AsyncOpenAiClient
is used, but the error messages are still there. I have created a simple reproducer here: https://github.com/maxhov/spring-ai-streaming-issue/blob/master/src/test/java/com/example/springaistreamingissue/SpringAiStreamingIssueApplicationTests.java