Closed xuechendi closed 9 months ago
Thanks for the report, we'll look into this.
Thanks for the report, we'll look into this.
Thank, @rattrayalex , I fixed by this PR if it makes sense to you https://github.com/openai/openai-python/pull/1173
@xuechendi we intentionally do not yield an event until an empty line is received as events can span multiple data
lines, the first example in the spec showcases this: https://html.spec.whatwg.org/multipage/server-sent-events.html
How did you run into this? Are you using a proxy server? If you are I suspect the proxy is not relaying the SSE content properly.
@RobertCraigie , I see! Thanks for the information. I am using a tricky self-hosted LLM. I'll double check with my LLM serving.
Still seeing occasional None
return types for streamed chat responses in the latest version of the SDK. Probably not caused by the same bug, but is anyone else still experiencing this? Should always return an iterator and never None
–– perhaps an unhandled 500 exception in the SDK?
@shobrook can you open an issue with an example repro?
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
decode function returns "None" when input is valid, Which leads to a 'None' output for streaming
To Reproduce
Code snippets
OS
Linux
Python version
python 3.9
Library version
openai 1.13.2