async-openai
async-openai copied to clipboard
Event source StreamEnded handling
There is an open issue in event source - https://github.com/jpopesculian/reqwest-eventsource/issues/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 - https://github.com/0xPlaygrounds/rig/issues/998 https://github.com/0xPlaygrounds/rig/pull/999
Is there a minimal reproducible example of this?