Class ConversationItemAdded
-
- All Implemented Interfaces:
public final class ConversationItemAddedSent by the server when an Item is added to the default Conversation. This can happen in several cases:
When the client sends a
conversation.item.createevent.When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer.
When the model is generating a Response. In this case the
conversation.item.addedevent will be sent when the model starts generating a specific Item, and thus it will not yet have any content (andstatuswill bein_progress).
The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a
conversation.item.retrieveevent if necessary.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classConversationItemAdded.BuilderA builder for ConversationItemAdded.
-
Method Summary
Modifier and Type Method Description final StringeventId()The unique ID of the server event. final ConversationItemitem()A single item within a Realtime conversation. final JsonValue_type()The event type, must be conversation.item.added.final Optional<String>previousItemId()The ID of the item that precedes this one, if any. final JsonField<String>_eventId()Returns the raw JSON value of eventId. final JsonField<ConversationItem>_item()Returns the raw JSON value of item. final JsonField<String>_previousItemId()Returns the raw JSON value of previousItemId. final Map<String, JsonValue>_additionalProperties()final ConversationItemAdded.BuildertoBuilder()final ConversationItemAddedvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ConversationItemAdded.Builderbuilder()Returns a mutable builder for constructing an instance of ConversationItemAdded. -
-
Method Detail
-
item
final ConversationItem item()
A single item within a Realtime conversation.
-
_type
final JsonValue _type()
The event type, must be
conversation.item.added.Expected to always return the following:
JsonValue.from("conversation.item.added")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
previousItemId
final Optional<String> previousItemId()
The ID of the item that precedes this one, if any. This is used to maintain ordering when items are inserted.
-
_eventId
final JsonField<String> _eventId()
Returns the raw JSON value of eventId.
Unlike eventId, this method doesn't throw if the JSON field has an unexpected type.
-
_item
final JsonField<ConversationItem> _item()
Returns the raw JSON value of item.
Unlike item, this method doesn't throw if the JSON field has an unexpected type.
-
_previousItemId
final JsonField<String> _previousItemId()
Returns the raw JSON value of previousItemId.
Unlike previousItemId, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ConversationItemAdded.Builder toBuilder()
-
validate
final ConversationItemAdded validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static ConversationItemAdded.Builder builder()
Returns a mutable builder for constructing an instance of ConversationItemAdded.
The following fields are required:
.eventId() .item()
-
-
-
-