pub struct RealtimeServerEventConversationItemCreated {
pub event_id: String,
pub previous_item_id: String,
pub item: RealtimeConversationItem,
}
Expand description
Returned when a conversation item is created. There are several scenarios that produce this event:
- The server is generating a Response, which if successful will produce
either one or two Items, which will be of type
message
(roleassistant
) or typefunction_call
. - The input audio buffer has been committed, either by the client or the
server (in
server_vad
mode). The server will take the content of the input audio buffer and add it to a new user message Item. - The client has sent a
conversation.item.create
event to add a new Item to the Conversation.
Fields§
§event_id: String
The unique ID of the server event.
previous_item_id: String
The ID of the preceding item in the Conversation context, allows the client to understand the order of the conversation.
item: RealtimeConversationItem
Implementations§
Source§impl RealtimeServerEventConversationItemCreated
impl RealtimeServerEventConversationItemCreated
Sourcepub fn builder() -> RealtimeServerEventConversationItemCreatedBuilder<((), (), ())>
pub fn builder() -> RealtimeServerEventConversationItemCreatedBuilder<((), (), ())>
Create a builder for building RealtimeServerEventConversationItemCreated
.
On the builder, call .event_id(...)
, .previous_item_id(...)
, .item(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of RealtimeServerEventConversationItemCreated
.
Trait Implementations§
Source§impl Clone for RealtimeServerEventConversationItemCreated
impl Clone for RealtimeServerEventConversationItemCreated
Source§fn clone(&self) -> RealtimeServerEventConversationItemCreated
fn clone(&self) -> RealtimeServerEventConversationItemCreated
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<'de> Deserialize<'de> for RealtimeServerEventConversationItemCreated
impl<'de> Deserialize<'de> for RealtimeServerEventConversationItemCreated
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 RealtimeServerEventConversationItemCreated
impl PartialEq for RealtimeServerEventConversationItemCreated
Source§fn eq(&self, other: &RealtimeServerEventConversationItemCreated) -> bool
fn eq(&self, other: &RealtimeServerEventConversationItemCreated) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for RealtimeServerEventConversationItemCreated
Auto Trait Implementations§
impl Freeze for RealtimeServerEventConversationItemCreated
impl RefUnwindSafe for RealtimeServerEventConversationItemCreated
impl Send for RealtimeServerEventConversationItemCreated
impl Sync for RealtimeServerEventConversationItemCreated
impl Unpin for RealtimeServerEventConversationItemCreated
impl UnwindSafe for RealtimeServerEventConversationItemCreated
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