Skip to content

client.Beta.Threads.Runs.NewStreaming ends inmediatly #127

Closed
@crazybolillo

Description

@crazybolillo

I am using the code provided in the example for assistant streaming:

stream := client.Beta.Threads.Runs.NewStreaming(ctx, thread.ID, openai.BetaThreadRunNewParams{
AssistantID: openai.String(assistant.ID),
Instructions: openai.String("Please address the user as Jane Doe. The user has a premium account."),
})
if err != nil {
panic(err)
}
for stream.Next() {
evt := stream.Current()
println(fmt.Sprintf("%T", evt.Data))
}

And I get a single api.Run event and then the loop exits and code finished. Is this a bug? Or am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions