pub struct RealtimeClientEventConversationItemCreate {
pub event_id: Option<String>,
pub previous_item_id: Option<String>,
pub item: RealtimeConversationItem,
}
Expand description
Add a new Item to the Conversation’s context, including messages, function calls, and function call responses. This event can be used both to populate a “history” of the conversation and to add new items mid-stream, but has the current limitation that it cannot populate assistant audio messages.
If successful, the server will respond with a conversation.item.created
event, otherwise an error
event will be sent.
Fields§
§event_id: Option<String>
Optional client-generated ID used to identify this event.
previous_item_id: Option<String>
The ID of the preceding item after which the new item will be inserted.
If not set, the new item will be appended to the end of the conversation.
If set to root
, the new item will be added to the beginning of the conversation.
If set to an existing ID, it allows an item to be inserted mid-conversation. If the
ID cannot be found, an error will be returned and the item will not be added.
item: RealtimeConversationItem
Implementations§
Source§impl RealtimeClientEventConversationItemCreate
impl RealtimeClientEventConversationItemCreate
Sourcepub fn builder() -> RealtimeClientEventConversationItemCreateBuilder<((), (), ())>
pub fn builder() -> RealtimeClientEventConversationItemCreateBuilder<((), (), ())>
Create a builder for building RealtimeClientEventConversationItemCreate
.
On the builder, call .event_id(...)
(optional), .previous_item_id(...)
(optional), .item(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of RealtimeClientEventConversationItemCreate
.
Trait Implementations§
Source§impl Clone for RealtimeClientEventConversationItemCreate
impl Clone for RealtimeClientEventConversationItemCreate
Source§fn clone(&self) -> RealtimeClientEventConversationItemCreate
fn clone(&self) -> RealtimeClientEventConversationItemCreate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for RealtimeClientEventConversationItemCreate
impl Default for RealtimeClientEventConversationItemCreate
Source§fn default() -> RealtimeClientEventConversationItemCreate
fn default() -> RealtimeClientEventConversationItemCreate
Source§impl<'de> Deserialize<'de> for RealtimeClientEventConversationItemCreate
impl<'de> Deserialize<'de> for RealtimeClientEventConversationItemCreate
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>,
Source§impl PartialEq for RealtimeClientEventConversationItemCreate
impl PartialEq for RealtimeClientEventConversationItemCreate
Source§fn eq(&self, other: &RealtimeClientEventConversationItemCreate) -> bool
fn eq(&self, other: &RealtimeClientEventConversationItemCreate) -> bool
self
and other
values to be equal, and is used by ==
.