Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(sse): add space between event name and value for compatibility
according to https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation using `field: value` style is OK. > Collect the characters on the line after the first U+003A COLON character (:), and let value be that string. If value starts with a U+0020 SPACE character, remove it from value. other client side tools may detect the `data` field rely on the space, like this one https://github.com/openai/openai-python/blob/b82a3f7e4c462a8a10fa445193301a3cefef9a4a/openai/api_requestor.py#L106 and this one: https://github.com/sashabaranov/go-openai/blob/71a24931dbc5b7029901ff963dc4d0d2509aa7ed/stream_reader.go#L14
- Loading branch information