Closed gavi closed 5 months ago
I I didn't notice such a thing before. Do you think this is new behavior? Do you have any sample code or prompt?
I was using the client with text-generation-webui openai plugin and noticed the crash. Then I checked the official python implementation from openai and saw the ping messages in their src/test_streaming.py Edit:
Just to add the spec: https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation
I have made some updates. I thought that maybe someone might find this data useful, so I kept it as optional.
Could you test my implementation to see if it helps? I couldn't test it because I don't have any prompts to trigger pings
. I would greatly appreciate it if you could share one with me.
When testing the client with streaming chat, I noticed the JSON parser crashes for lines that start at with ": ping", I believe its because the api sends chunks with event: ping which needs to be ignored