Skip to content

[07_streaming] Missing await msg.send() causes spinner to stay spinning after streaming ends #34

@hafeezsiddiqui27

Description

@hafeezsiddiqui27

in the folder named "07-streaming" code ,While using Chainlit with Runner.run_streamed() and msg.stream_token(token), the message keeps showing the loading spinner even after the response finishes streaming.

After some trial and error, I found that adding

await @msg.send()

after the streaming loop finalizes the message and stops the spinner.

Suggested improvement:

Consider documenting this in the streaming example.
Or better yet, automatically finalize the message when streaming ends, unless explicitly held open.

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