Class ConversationItem
- 
                    
                    
- All Implemented Interfaces:
 
public final class ConversationItemThe item to add to the conversation.
 
- 
                
                    
                    
- 
                                
                            
                                
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classConversationItem.BuilderA builder for ConversationItem.
public final classConversationItem.ObjectIdentifier for the API object being returned - always
realtime.item.public final classConversationItem.RoleThe role of the message sender (
user,assistant,system), only applicable formessageitems.public final classConversationItem.StatusThe status of the item (
completed,incomplete,in_progress). These have no effect on the conversation, but are accepted for consistency with theconversation.item.createdevent.public final classConversationItem.TypeThe type of the item (
message,function_call,function_call_output). 
- 
                                
                            
                                
Method Summary
Modifier and Type Method Description final Optional<String>id()The unique ID of the item, this can be generated by the client to help manage server-side context, but is not required because the server will generate one if not provided. final Optional<String>arguments()The arguments of the function call (for function_callitems).final Optional<String>callId()The ID of the function call (for function_callandfunction_call_outputitems).final Optional<List<ConversationItemContent>>content()The content of the message, applicable for messageitems.final Optional<String>name()The name of the function being called (for function_callitems).final Optional<ConversationItem.Object>object_()Identifier for the API object being returned - always realtime.item.final Optional<String>output()The output of the function call (for function_call_outputitems).final Optional<ConversationItem.Role>role()The role of the message sender ( user,assistant,system), only applicable formessageitems.final Optional<ConversationItem.Status>status()The status of the item ( completed,incomplete,in_progress).final Optional<ConversationItem.Type>type()The type of the item ( message,function_call,function_call_output).final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<String>_arguments()Returns the raw JSON value of arguments. final JsonField<String>_callId()Returns the raw JSON value of callId. final JsonField<List<ConversationItemContent>>_content()Returns the raw JSON value of content. final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<ConversationItem.Object>_object_()Returns the raw JSON value of object_. final JsonField<String>_output()Returns the raw JSON value of output. final JsonField<ConversationItem.Role>_role()Returns the raw JSON value of role. final JsonField<ConversationItem.Status>_status()Returns the raw JSON value of status. final JsonField<ConversationItem.Type>_type()Returns the raw JSON value of type. final Map<String, JsonValue>_additionalProperties()final ConversationItem.BuildertoBuilder()final ConversationItemvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ConversationItem.Builderbuilder()Returns a mutable builder for constructing an instance of ConversationItem. - 
                    
                    
                    
- 
                                
                            
                                
Method Detail
- 
                                        
id
final Optional<String> id()
The unique ID of the item, this can be generated by the client to help manage server-side context, but is not required because the server will generate one if not provided.
 
- 
                                        
arguments
final Optional<String> arguments()
The arguments of the function call (for
function_callitems). 
- 
                                        
callId
final Optional<String> callId()
The ID of the function call (for
function_callandfunction_call_outputitems). If passed on afunction_call_outputitem, the server will check that afunction_callitem with the same ID exists in the conversation history. 
- 
                                        
content
final Optional<List<ConversationItemContent>> content()
The content of the message, applicable for
messageitems.Message items of role
systemsupport onlyinput_textcontentMessage items of role
usersupportinput_textandinput_audiocontentMessage items of role
assistantsupporttextcontent.
 
- 
                                        
object_
final Optional<ConversationItem.Object> object_()
Identifier for the API object being returned - always
realtime.item. 
- 
                                        
output
final Optional<String> output()
The output of the function call (for
function_call_outputitems). 
- 
                                        
role
final Optional<ConversationItem.Role> role()
The role of the message sender (
user,assistant,system), only applicable formessageitems. 
- 
                                        
status
final Optional<ConversationItem.Status> status()
The status of the item (
completed,incomplete,in_progress). These have no effect on the conversation, but are accepted for consistency with theconversation.item.createdevent. 
- 
                                        
type
final Optional<ConversationItem.Type> type()
The type of the item (
message,function_call,function_call_output). 
- 
                                        
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
 
- 
                                        
_arguments
final JsonField<String> _arguments()
Returns the raw JSON value of arguments.
Unlike arguments, this method doesn't throw if the JSON field has an unexpected type.
 
- 
                                        
_callId
final JsonField<String> _callId()
Returns the raw JSON value of callId.
Unlike callId, this method doesn't throw if the JSON field has an unexpected type.
 
- 
                                        
_content
final JsonField<List<ConversationItemContent>> _content()
Returns the raw JSON value of content.
Unlike content, this method doesn't throw if the JSON field has an unexpected type.
 
- 
                                        
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
 
- 
                                        
_object_
final JsonField<ConversationItem.Object> _object_()
Returns the raw JSON value of object_.
Unlike object_, this method doesn't throw if the JSON field has an unexpected type.
 
- 
                                        
_output
final JsonField<String> _output()
Returns the raw JSON value of output.
Unlike output, this method doesn't throw if the JSON field has an unexpected type.
 
- 
                                        
_role
final JsonField<ConversationItem.Role> _role()
Returns the raw JSON value of role.
Unlike role, this method doesn't throw if the JSON field has an unexpected type.
 
- 
                                        
_status
final JsonField<ConversationItem.Status> _status()
Returns the raw JSON value of status.
Unlike status, this method doesn't throw if the JSON field has an unexpected type.
 
- 
                                        
_type
final JsonField<ConversationItem.Type> _type()
Returns the raw JSON value of type.
Unlike type, this method doesn't throw if the JSON field has an unexpected type.
 
- 
                                        
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
 
- 
                                        
toBuilder
final ConversationItem.Builder toBuilder()
 
- 
                                        
validate
final ConversationItem validate()
 
- 
                                        
builder
final static ConversationItem.Builder builder()
Returns a mutable builder for constructing an instance of ConversationItem.
 
 - 
                                        
 
 - 
                                
                            
                                
 
 - 
                    
                    
                    
 
 -