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,
},
ResponseCreate {
client_timestamp: Option<i64>,
},
ResponseCancel {
client_timestamp: Option<i64>,
},
}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, …).
InputAudioBufferAppend
input_audio_buffer.append — upload base64 WAV audio.
InputAudioBufferAppendVideoFrame
input_audio_buffer.append_video_frame — upload a base64 JPEG frame.
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.
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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientEvent
impl Debug for ClientEvent
Auto Trait Implementations§
impl Freeze for ClientEvent
impl RefUnwindSafe for ClientEvent
impl Send for ClientEvent
impl Sync for ClientEvent
impl Unpin for ClientEvent
impl UnsafeUnpin for ClientEvent
impl UnwindSafe for ClientEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more