pub enum ClientEvent {
SessionUpdate {
session: SessionUpdatePayload,
},
InputAudioBufferAppend {
event_id: Option<String>,
audio: String,
},
ConversationItemCommit {
event_id: Option<String>,
},
InputAudioBufferClear {
event_id: Option<String>,
},
ConversationItemCreate {
event_id: Option<String>,
item: ConversationItem,
},
ResponseCreate {
event_id: Option<String>,
response: Option<ResponseCreatePayload>,
},
ResponseCancel {
event_id: Option<String>,
},
}Expand description
Events sent from client to Grok
Variants§
SessionUpdate
Update session configuration
Fields
§
session: SessionUpdatePayloadInputAudioBufferAppend
Append audio to input buffer
ConversationItemCommit
Commit the audio buffer (create user message)
InputAudioBufferClear
Clear the audio buffer
ConversationItemCreate
Create a conversation item (e.g., tool result)
ResponseCreate
Trigger a response from the model
ResponseCancel
Cancel an in-progress response
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 · 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 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