Enum SessionCommand
pub enum SessionCommand {
SendAudio(Vec<u8>),
SendText(String),
SendToolResponse(Vec<FunctionResponse>),
ActivityStart,
ActivityEnd,
SendClientContent {
turns: Vec<Content>,
turn_complete: bool,
},
SendVideo(Vec<u8>),
UpdateInstruction(String),
Disconnect,
}Expand description
Commands sent from application code to the session transport.
Variants§
SendAudio(Vec<u8>)
Send audio data (raw PCM16 bytes, will be base64-encoded).
SendText(String)
Send a text message.
SendToolResponse(Vec<FunctionResponse>)
Send tool responses.
ActivityStart
Signal activity start (client VAD detected speech).
ActivityEnd
Signal activity end (client VAD detected silence).
SendClientContent
Send client content (conversation history or context injection).
Fields
SendVideo(Vec<u8>)
Send video/image data (raw JPEG bytes, will be base64-encoded).
UpdateInstruction(String)
Update system instruction mid-session (sends client_content with role=system).
Disconnect
Gracefully disconnect.
Trait Implementations§
§impl Clone for SessionCommand
impl Clone for SessionCommand
§fn clone(&self) -> SessionCommand
fn clone(&self) -> SessionCommand
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 moreAuto Trait Implementations§
impl Freeze for SessionCommand
impl RefUnwindSafe for SessionCommand
impl Send for SessionCommand
impl Sync for SessionCommand
impl Unpin for SessionCommand
impl UnwindSafe for SessionCommand
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