pub enum ServerEvent {
Show 32 variants
SessionCreated(SessionCreatedEvent),
SessionUpdated(SessionUpdatedEvent),
ConversationCreated(ConversationCreatedEvent),
ConversationItemCreated(ConversationItemCreatedEvent),
ConversationItemRetrieved(ConversationItemRetrievedEvent),
ConversationItemDeleted(ConversationItemDeletedEvent),
ConversationItemTruncated(ConversationItemTruncatedEvent),
InputAudioTranscriptionCompleted(InputAudioTranscriptionCompletedEvent),
InputAudioTranscriptionFailed(InputAudioTranscriptionFailedEvent),
InputAudioBufferCommitted(InputAudioBufferCommittedEvent),
InputAudioBufferCleared(InputAudioBufferClearedEvent),
InputAudioBufferSpeechStarted(SpeechStartedEvent),
InputAudioBufferSpeechStopped(SpeechStoppedEvent),
OutputAudioBufferStarted(OutputAudioBufferEvent),
OutputAudioBufferStopped(OutputAudioBufferStoppedEvent),
OutputAudioBufferCleared(OutputAudioBufferEvent),
ResponseCreated(ResponseCreatedEvent),
ResponseDone(ResponseDoneEvent),
ResponseOutputItemAdded(ResponseOutputItemEvent),
ResponseOutputItemDone(ResponseOutputItemEvent),
ResponseContentPartAdded(ResponseContentPartEvent),
ResponseContentPartDone(ResponseContentPartEvent),
ResponseTextDelta(ResponseTextDeltaEvent),
ResponseTextDone(ResponseTextDoneEvent),
ResponseAudioDelta(ResponseAudioDeltaEvent),
ResponseAudioDone(ResponseAudioDoneEvent),
ResponseAudioTranscriptDelta(ResponseAudioTranscriptDeltaEvent),
ResponseAudioTranscriptDone(ResponseAudioTranscriptDoneEvent),
ResponseFunctionCallArgumentsDelta(ResponseFunctionCallArgumentsDeltaEvent),
ResponseFunctionCallArgumentsDone(ResponseFunctionCallArgumentsDoneEvent),
RateLimitsUpdated(RateLimitsUpdatedEvent),
Error(ErrorEvent),
}Expand description
Server events received from the OpenAI Realtime API.
Variants§
SessionCreated(SessionCreatedEvent)
Session was created (first event after connection).
SessionUpdated(SessionUpdatedEvent)
Session configuration was updated.
ConversationCreated(ConversationCreatedEvent)
Conversation was created.
ConversationItemCreated(ConversationItemCreatedEvent)
Conversation item was created.
ConversationItemRetrieved(ConversationItemRetrievedEvent)
Conversation item was retrieved.
ConversationItemDeleted(ConversationItemDeletedEvent)
Conversation item was deleted.
ConversationItemTruncated(ConversationItemTruncatedEvent)
Conversation item was truncated.
InputAudioTranscriptionCompleted(InputAudioTranscriptionCompletedEvent)
Input audio transcription completed.
InputAudioTranscriptionFailed(InputAudioTranscriptionFailedEvent)
Input audio transcription failed.
InputAudioBufferCommitted(InputAudioBufferCommittedEvent)
Input audio buffer was committed.
InputAudioBufferCleared(InputAudioBufferClearedEvent)
Input audio buffer was cleared.
InputAudioBufferSpeechStarted(SpeechStartedEvent)
Speech started in input audio.
InputAudioBufferSpeechStopped(SpeechStoppedEvent)
Speech stopped in input audio.
OutputAudioBufferStarted(OutputAudioBufferEvent)
Output audio buffer playback started.
OutputAudioBufferStopped(OutputAudioBufferStoppedEvent)
Output audio buffer playback stopped.
OutputAudioBufferCleared(OutputAudioBufferEvent)
Output audio buffer was cleared.
ResponseCreated(ResponseCreatedEvent)
Response was created.
ResponseDone(ResponseDoneEvent)
Response generation completed.
ResponseOutputItemAdded(ResponseOutputItemEvent)
Output item was added to response.
ResponseOutputItemDone(ResponseOutputItemEvent)
Output item completed.
ResponseContentPartAdded(ResponseContentPartEvent)
Content part was added.
ResponseContentPartDone(ResponseContentPartEvent)
Content part completed.
ResponseTextDelta(ResponseTextDeltaEvent)
Text delta received.
ResponseTextDone(ResponseTextDoneEvent)
Text output completed.
ResponseAudioDelta(ResponseAudioDeltaEvent)
Audio delta received.
ResponseAudioDone(ResponseAudioDoneEvent)
Audio output completed.
ResponseAudioTranscriptDelta(ResponseAudioTranscriptDeltaEvent)
Audio transcript delta received.
ResponseAudioTranscriptDone(ResponseAudioTranscriptDoneEvent)
Audio transcript completed.
ResponseFunctionCallArgumentsDelta(ResponseFunctionCallArgumentsDeltaEvent)
Function call arguments delta.
ResponseFunctionCallArgumentsDone(ResponseFunctionCallArgumentsDoneEvent)
Function call arguments completed.
RateLimitsUpdated(RateLimitsUpdatedEvent)
Rate limits updated.
Error(ErrorEvent)
Error occurred.
Implementations§
Trait Implementations§
Source§impl Clone for ServerEvent
impl Clone for ServerEvent
Source§fn clone(&self) -> ServerEvent
fn clone(&self) -> ServerEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerEvent
impl Debug for ServerEvent
Source§impl<'de> Deserialize<'de> for ServerEvent
impl<'de> Deserialize<'de> for ServerEvent
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>,
Auto Trait Implementations§
impl Freeze for ServerEvent
impl RefUnwindSafe for ServerEvent
impl Send for ServerEvent
impl Sync for ServerEvent
impl Unpin for ServerEvent
impl UnsafeUnpin for ServerEvent
impl UnwindSafe for ServerEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more