pub enum RealtimeSessionEvent {
Show 14 variants
InputTranscriptPartial {
text: String,
},
InputTranscriptFinal {
text: String,
},
InputTranscriptFinalForItem {
item_id: String,
previous_item_id: Option<String>,
content_index: u32,
text: String,
},
TurnStarted,
TurnCommitted,
TurnCompleted {
response_id: String,
stop_reason: StopReason,
usage: Usage,
},
OutputTextDelta {
delta: String,
},
OutputTextDeltaForItem {
response_id: String,
delta_id: String,
item_id: String,
previous_item_id: Option<String>,
content_index: u32,
delta: String,
},
OutputAudioChunk {
chunk: RealtimeAudioChunk,
},
OutputVideoChunk {
chunk: RealtimeVideoChunk,
},
Interrupted {
response_id: Option<String>,
},
ToolCallRequested {
call_id: String,
tool_name: String,
arguments: Value,
},
AssistantTranscriptTruncated {
response_id: Option<String>,
item_id: String,
audio_played_ms: u64,
truncated_text: Option<String>,
},
RealtimeTranscript {
event: RealtimeTranscriptEvent,
},
}Expand description
Provider-neutral realtime event stream.
Variants§
InputTranscriptPartial
InputTranscriptFinal
InputTranscriptFinalForItem
TurnStarted
TurnCommitted
TurnCompleted
OutputTextDelta
OutputTextDeltaForItem
Fields
OutputAudioChunk
Fields
§
chunk: RealtimeAudioChunkOutputVideoChunk
Fields
§
chunk: RealtimeVideoChunkInterrupted
ToolCallRequested
AssistantTranscriptTruncated
The assistant output identified by item_id was truncated at
audio_played_ms because the user barged in. truncated_text is the
heard prefix, or None if the provider has not yet re-projected it.
Fields
RealtimeTranscript
Identity-bearing transcript event for providers that need to expose an ordering/append fact without an otherwise public channel event.
Fields
§
event: RealtimeTranscriptEventImplementations§
Source§impl RealtimeSessionEvent
impl RealtimeSessionEvent
Sourcepub fn to_public_event(&self) -> Option<RealtimeEvent>
pub fn to_public_event(&self) -> Option<RealtimeEvent>
Project an internal provider event into the public channel event shape.
Trait Implementations§
Source§impl Clone for RealtimeSessionEvent
impl Clone for RealtimeSessionEvent
Source§fn clone(&self) -> RealtimeSessionEvent
fn clone(&self) -> RealtimeSessionEvent
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 RealtimeSessionEvent
impl Debug for RealtimeSessionEvent
Source§impl PartialEq for RealtimeSessionEvent
impl PartialEq for RealtimeSessionEvent
Source§fn eq(&self, other: &RealtimeSessionEvent) -> bool
fn eq(&self, other: &RealtimeSessionEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RealtimeSessionEvent
Auto Trait Implementations§
impl Freeze for RealtimeSessionEvent
impl RefUnwindSafe for RealtimeSessionEvent
impl Send for RealtimeSessionEvent
impl Sync for RealtimeSessionEvent
impl Unpin for RealtimeSessionEvent
impl UnsafeUnpin for RealtimeSessionEvent
impl UnwindSafe for RealtimeSessionEvent
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