#[non_exhaustive]pub enum RealtimeServerEvent {
Show 23 variants
SessionCreated {
session_id: Option<String>,
raw: JsonValue,
},
SessionUpdated {
raw: JsonValue,
},
SpeechStarted {
item_id: Option<String>,
raw: JsonValue,
},
SpeechStopped {
item_id: Option<String>,
raw: JsonValue,
},
AudioCommitted {
item_id: Option<String>,
previous_item_id: Option<String>,
raw: JsonValue,
},
ConversationItemAdded {
item_id: String,
item: JsonValue,
raw: JsonValue,
},
InputTranscriptionCompleted {
item_id: String,
transcript: String,
raw: JsonValue,
},
ResponseCreated {
response_id: String,
raw: JsonValue,
},
ResponseDone {
response_id: String,
status: String,
raw: JsonValue,
},
OutputItemAdded {
response_id: String,
item_id: String,
raw: JsonValue,
},
OutputItemDone {
response_id: String,
item_id: String,
raw: JsonValue,
},
ContentPartAdded {
response_id: String,
item_id: String,
raw: JsonValue,
},
ContentPartDone {
response_id: String,
item_id: String,
raw: JsonValue,
},
AudioDelta {
response_id: String,
item_id: String,
delta: Bytes,
raw: JsonValue,
},
AudioDone {
response_id: String,
item_id: String,
raw: JsonValue,
},
AudioTranscriptDelta {
response_id: String,
item_id: String,
delta: String,
raw: JsonValue,
},
AudioTranscriptDone {
response_id: String,
item_id: String,
transcript: Option<String>,
raw: JsonValue,
},
TextDelta {
response_id: String,
item_id: String,
delta: String,
raw: JsonValue,
},
TextDone {
response_id: String,
item_id: String,
text: Option<String>,
raw: JsonValue,
},
FunctionCallArgumentsDelta {
response_id: String,
item_id: String,
call_id: String,
delta: String,
raw: JsonValue,
},
FunctionCallArgumentsDone {
response_id: String,
item_id: String,
call_id: String,
name: String,
arguments: String,
raw: JsonValue,
},
Error {
message: String,
code: Option<String>,
raw: JsonValue,
},
Custom {
raw_type: String,
raw: JsonValue,
},
}Expand description
Events received from the server, tagged by type.
Every variant carries the raw provider message in raw.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SessionCreated
Session created.
SessionUpdated
Session updated.
SpeechStarted
Speech started.
SpeechStopped
Speech stopped.
AudioCommitted
Input audio committed.
Fields
ConversationItemAdded
Conversation item added.
InputTranscriptionCompleted
Input transcription completed.
ResponseCreated
Response created.
ResponseDone
Response done.
OutputItemAdded
Output item added.
OutputItemDone
Output item done.
ContentPartAdded
Content part added.
ContentPartDone
Content part done.
AudioDelta
Audio increment.
Fields
AudioDone
Audio done.
AudioTranscriptDelta
Audio transcript increment.
Fields
AudioTranscriptDone
Audio transcript done.
Fields
TextDelta
Text increment.
Fields
TextDone
Text done.
Fields
FunctionCallArgumentsDelta
Function call arguments increment.
Fields
FunctionCallArgumentsDone
Function call arguments done.
Fields
Error
Error.
Custom
A provider event without a standardized mapping.
Trait Implementations§
Source§impl Clone for RealtimeServerEvent
impl Clone for RealtimeServerEvent
Source§fn clone(&self) -> RealtimeServerEvent
fn clone(&self) -> RealtimeServerEvent
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 RealtimeServerEvent
impl Debug for RealtimeServerEvent
Source§impl<'de> Deserialize<'de> for RealtimeServerEvent
impl<'de> Deserialize<'de> for RealtimeServerEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RealtimeServerEvent
impl PartialEq for RealtimeServerEvent
Source§impl Serialize for RealtimeServerEvent
impl Serialize for RealtimeServerEvent
impl StructuralPartialEq for RealtimeServerEvent
Auto Trait Implementations§
impl !Freeze for RealtimeServerEvent
impl RefUnwindSafe for RealtimeServerEvent
impl Send for RealtimeServerEvent
impl Sync for RealtimeServerEvent
impl Unpin for RealtimeServerEvent
impl UnsafeUnpin for RealtimeServerEvent
impl UnwindSafe for RealtimeServerEvent
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