pub enum ClientEvent {
SessionUpdate {
event_id: Option<String>,
session: SessionConfig,
},
InputAudioBufferAppend {
audio: String,
client_timestamp: Option<i64>,
},
InputAudioBufferAppendVideoFrame {
video_frame: String,
client_timestamp: Option<i64>,
},
InputAudioBufferCommit {
client_timestamp: Option<i64>,
},
InputAudioBufferClear,
ConversationItemCreate {
event_id: Option<String>,
item: RealtimeConversationItem,
},
ConversationItemDelete {
event_id: Option<String>,
client_timestamp: Option<i64>,
item_id: String,
},
ConversationItemRetrieve {
event_id: Option<String>,
client_timestamp: Option<i64>,
item_id: String,
},
ResponseCreate {
client_timestamp: Option<i64>,
},
ResponseCancel {
client_timestamp: Option<i64>,
},
}realtime only.Expand description
A client event, tagged by type to match the official event names.
Variants§
SessionUpdate
session.update — set the session defaults (formats, VAD, tools, …).
Fields
session: SessionConfigNew session configuration to apply.
InputAudioBufferAppend
input_audio_buffer.append — upload base64 WAV audio.
Fields
InputAudioBufferAppendVideoFrame
input_audio_buffer.append_video_frame — upload a base64 JPEG frame.
Fields
InputAudioBufferCommit
input_audio_buffer.commit — commit buffered audio for inference.
InputAudioBufferClear
input_audio_buffer.clear — clear the buffer.
ConversationItemCreate
conversation.item.create — inject a text message or function-call
output into the conversation history.
Fields
item: RealtimeConversationItemThe conversation item to insert.
ConversationItemDelete
conversation.item.delete — remove an item from conversation history.
Fields
ConversationItemRetrieve
conversation.item.retrieve — request one conversation-history item.
Fields
ResponseCreate
response.create — trigger model inference.
ResponseCancel
response.cancel — cancel the in-flight response (interruption).
Trait Implementations§
Source§impl Clone for ClientEvent
impl Clone for ClientEvent
Source§fn clone(&self) -> ClientEvent
fn clone(&self) -> ClientEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more