Open Stevenic opened 2 weeks ago
The reason for throwing errors here is that this sort of thing should never happen. Can you reliably reproduce so I can fix?
I'm seeing the same thing using a relay server. I can reproduce it consistently by:
response.audio.delta
events (can happen with other response events too)disconnect()
on the RealtimeClient
in the browser clientFrom what I can tell, calling client.disconnect()
in the browser causes a call to client.disconnect()
on the relay server (I'm using the relay server from the openai-realtime-console repo). This calls conversation.clear()
on the relay server RealtimeClient
. If the relay server client is already processing a response.audio.delta
event, the event_id lookup will fail causing the error. I've confirmed that removing the line this.conversation.clear();
from the disconnect()
method in RealtimeClient
on server stops the error from occurring (though is obviously not a real fix).
Yeah I periodically get them for transcription deltas as well. It's very annoying because it means i can't prevent the relay server from crashing
Error: response.audio_transcript.delta: Item "item_AGBPgXAeI4ng5ST0WGzc5" not found
My relay server instance sometimes dies with this error...
The issue is that internal socket handlers are throwing exceptions which can't easily be caught. If you hit an error like this you should map it to a
error
event of some sort...