Description
Describe the bug
In openai-python the SSE parser always check the additional space after "data:"
openai-python/openai/api_requestor.py
Line 106 in 041bf5a
But according to the SSE spec "data: " is identical to "data:"
https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events
`The following stream fires two identical events:
data:test
data: test
This is because the space after the colon is ignored if present.`
The use case is some organizations might proxy the response for additional control but not all library put a whitespace after the colon ex. springframework https://github.com/spring-projects/spring-framework/blob/f06cf21341a35f863b327e0bfe2305111f69c468/spring-web/src/main/java/org/springframework/http/codec/ServerSentEventHttpMessageWriter.java#L146
if (data != null) { sb.append("data:"); }
To Reproduce
Proxy OpenAI API with spring framework
Code snippets
No response
OS
All
Python version
All
Library version
All