Skip to content

Event source StreamEnded handling #456

@polartulip

Description

@polartulip

There is an open issue in event source - jpopesculian/reqwest-eventsource#15
Where it treats stream ending as error, that bubbles up through async openai crate.

This error never seemed to have occurred in chat completion stream api, but was noticed when we moved to response stream api.
It would be great to have handling logic for this edge case within the crate.

Ignoring StreamEnded error and testing it over period of few days seems to confirm that it is not a genuine error, quality of response hasn't been effected.

If you decide to incorporate this into your crate, I can assist with a pr!

P.S: rig seems to have recently consolidated for same issue - 0xPlaygrounds/rig#998
0xPlaygrounds/rig#999

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions