Class ConversationItemCreatedEvent
- 
                    
                    
- All Implemented Interfaces:
 
public final class ConversationItemCreatedEventReturned 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_vadmode). 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.createevent to add a new Item to the Conversation.
 
- 
                
                    
                    
- 
                                
                            
                                
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classConversationItemCreatedEvent.BuilderA builder for ConversationItemCreatedEvent.
 
- 
                                
                            
                                
Method Summary
Modifier and Type Method Description final StringeventId()The unique ID of the server event. final ConversationItemitem()The item to add to the conversation. final JsonValue_type()The event type, must be conversation.item.created.final Optional<String>previousItemId()The ID of the preceding item in the Conversation context, allows the client to understand the order of the conversation. 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 ConversationItemCreatedEvent.BuildertoBuilder()final ConversationItemCreatedEventvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ConversationItemCreatedEvent.Builderbuilder()Returns a mutable builder for constructing an instance of ConversationItemCreatedEvent. - 
                    
                    
                    
- 
                                
                            
                                
Method Detail
- 
                                        
item
final ConversationItem item()
The item to add to the conversation.
 
- 
                                        
_type
final JsonValue _type()
The event type, must be
conversation.item.created.Expected to always return the following:
JsonValue.from("conversation.item.created")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 preceding item in the Conversation context, allows the client to understand the order of the conversation. Can be
nullif the item has no predecessor. 
- 
                                        
_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 ConversationItemCreatedEvent.Builder toBuilder()
 
- 
                                        
validate
final ConversationItemCreatedEvent validate()
 
- 
                                        
builder
final static ConversationItemCreatedEvent.Builder builder()
Returns a mutable builder for constructing an instance of ConversationItemCreatedEvent.
The following fields are required:
.eventId() .item() 
 - 
                                        
 
 - 
                                
                            
                                
 
 - 
                    
                    
                    
 
 -