You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
examples/beta/assistant-streaming/main.go sends a query requesting a streamed response.
But the code that handles the stream just prints the type of each streamed chunk:
for stream.Next() {
evt := stream.Current()
println(fmt.Sprintf("%T", evt.Data))
}
The example should demonstrate full decoding and printing of the streamed reply.
(The standard non-Assistant query streaming uses a openai.ChatCompletionAccumulator but this does not appear to handle openai.AssistantStreamEventUnion types.)
The text was updated successfully, but these errors were encountered:
the regular streaming example should demonstrate decoding and not just receiving of events
if the Assistants API is no longer supported then it should be noted in the README, and the assistants code removed from the SDK (otherwise, if the code is still present, people will expect it to work, and will open bug reports when it doesn't, etc.)
just as background to this issue, I was specifically interested in streaming Assistant responses as we have been experiencing occasional (but reproducible at the time) extremely high latency with the Assistants API (e.g. 58 seconds to return a response to a simple "hi"), along with Runs becoming stuck in the "cancelled" state (which appears to be a longstanding bug). I was hoping that streamed responses might not have these issues, but it appears not. Given that Assistants are now deprecated and unsupported, we should probably just remove this option for our users.
examples/beta/assistant-streaming/main.go
sends a query requesting a streamed response.But the code that handles the stream just prints the type of each streamed chunk:
The example should demonstrate full decoding and printing of the streamed reply.
(The standard non-Assistant query streaming uses a
openai.ChatCompletionAccumulator
but this does not appear to handleopenai.AssistantStreamEventUnion
types.)The text was updated successfully, but these errors were encountered: