Class ConversationItem.Builder
- 
                    
                    
- All Implemented Interfaces:
 
public final class ConversationItem.BuilderA builder for ConversationItem.
 
- 
                
                    
                    
- 
                                
                            
                                
Method Summary
Modifier and Type Method Description final ConversationItem.Builderid(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 ConversationItem.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final ConversationItem.Builderarguments(String arguments)The arguments of the function call (for function_callitems).final ConversationItem.Builderarguments(JsonField<String> arguments)Sets Builder.arguments to an arbitrary JSON value. final ConversationItem.BuildercallId(String callId)The ID of the function call (for function_callandfunction_call_outputitems).final ConversationItem.BuildercallId(JsonField<String> callId)Sets Builder.callId to an arbitrary JSON value. final ConversationItem.Buildercontent(List<ConversationItemContent> content)The content of the message, applicable for messageitems.final ConversationItem.Buildercontent(JsonField<List<ConversationItemContent>> content)Sets Builder.content to an arbitrary JSON value. final ConversationItem.BuilderaddContent(ConversationItemContent content)Adds a single ConversationItemContent to Builder.content. final ConversationItem.Buildername(String name)The name of the function being called (for function_callitems).final ConversationItem.Buildername(JsonField<String> name)Sets Builder.name to an arbitrary JSON value. final ConversationItem.Builderobject_(ConversationItem.Object object_)Identifier for the API object being returned - always realtime.item.final ConversationItem.Builderobject_(JsonField<ConversationItem.Object> object_)Sets Builder.object_ to an arbitrary JSON value. final ConversationItem.Builderoutput(String output)The output of the function call (for function_call_outputitems).final ConversationItem.Builderoutput(JsonField<String> output)Sets Builder.output to an arbitrary JSON value. final ConversationItem.Builderrole(ConversationItem.Role role)The role of the message sender ( user,assistant,system), only applicable formessageitems.final ConversationItem.Builderrole(JsonField<ConversationItem.Role> role)Sets Builder.role to an arbitrary JSON value. final ConversationItem.Builderstatus(ConversationItem.Status status)The status of the item ( completed,incomplete,in_progress).final ConversationItem.Builderstatus(JsonField<ConversationItem.Status> status)Sets Builder.status to an arbitrary JSON value. final ConversationItem.Buildertype(ConversationItem.Type type)The type of the item ( message,function_call,function_call_output).final ConversationItem.Buildertype(JsonField<ConversationItem.Type> type)Sets Builder.type to an arbitrary JSON value. final ConversationItem.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final ConversationItem.BuilderputAdditionalProperty(String key, JsonValue value)final ConversationItem.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final ConversationItem.BuilderremoveAdditionalProperty(String key)final ConversationItem.BuilderremoveAllAdditionalProperties(Set<String> keys)final ConversationItembuild()Returns an immutable instance of ConversationItem. - 
                    
                    
                    
- 
                                
                            
                                
Method Detail
- 
                                        
id
final ConversationItem.Builder id(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.
 
- 
                                        
id
final ConversationItem.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
arguments
final ConversationItem.Builder arguments(String arguments)
The arguments of the function call (for
function_callitems). 
- 
                                        
arguments
final ConversationItem.Builder arguments(JsonField<String> arguments)
Sets Builder.arguments to an arbitrary JSON value.
You should usually call Builder.arguments with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
callId
final ConversationItem.Builder callId(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. 
- 
                                        
callId
final ConversationItem.Builder callId(JsonField<String> callId)
Sets Builder.callId to an arbitrary JSON value.
You should usually call Builder.callId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
content
final ConversationItem.Builder content(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.
 
- 
                                        
content
final ConversationItem.Builder content(JsonField<List<ConversationItemContent>> content)
Sets Builder.content to an arbitrary JSON value.
You should usually call Builder.content with a well-typed
List<ConversationItemContent>value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
- 
                                        
addContent
final ConversationItem.Builder addContent(ConversationItemContent content)
Adds a single ConversationItemContent to Builder.content.
 
- 
                                        
name
final ConversationItem.Builder name(String name)
The name of the function being called (for
function_callitems). 
- 
                                        
name
final ConversationItem.Builder name(JsonField<String> name)
Sets Builder.name to an arbitrary JSON value.
You should usually call Builder.name with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
object_
final ConversationItem.Builder object_(ConversationItem.Object object_)
Identifier for the API object being returned - always
realtime.item. 
- 
                                        
object_
final ConversationItem.Builder object_(JsonField<ConversationItem.Object> object_)
Sets Builder.object_ to an arbitrary JSON value.
You should usually call Builder.object_ with a well-typed Object value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
output
final ConversationItem.Builder output(String output)
The output of the function call (for
function_call_outputitems). 
- 
                                        
output
final ConversationItem.Builder output(JsonField<String> output)
Sets Builder.output to an arbitrary JSON value.
You should usually call Builder.output with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
role
final ConversationItem.Builder role(ConversationItem.Role role)
The role of the message sender (
user,assistant,system), only applicable formessageitems. 
- 
                                        
role
final ConversationItem.Builder role(JsonField<ConversationItem.Role> role)
Sets Builder.role to an arbitrary JSON value.
You should usually call Builder.role with a well-typed Role value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
status
final ConversationItem.Builder status(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. 
- 
                                        
status
final ConversationItem.Builder status(JsonField<ConversationItem.Status> status)
Sets Builder.status to an arbitrary JSON value.
You should usually call Builder.status with a well-typed Status value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
type
final ConversationItem.Builder type(ConversationItem.Type type)
The type of the item (
message,function_call,function_call_output). 
- 
                                        
type
final ConversationItem.Builder type(JsonField<ConversationItem.Type> type)
Sets Builder.type to an arbitrary JSON value.
You should usually call Builder.type with a well-typed Type value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
additionalProperties
final ConversationItem.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
 
- 
                                        
putAdditionalProperty
final ConversationItem.Builder putAdditionalProperty(String key, JsonValue value)
 
- 
                                        
putAllAdditionalProperties
final ConversationItem.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
 
- 
                                        
removeAdditionalProperty
final ConversationItem.Builder removeAdditionalProperty(String key)
 
- 
                                        
removeAllAdditionalProperties
final ConversationItem.Builder removeAllAdditionalProperties(Set<String> keys)
 
- 
                                        
build
final ConversationItem build()
Returns an immutable instance of ConversationItem.
Further updates to this Builder will not mutate the returned instance.
 
 - 
                                        
 
 - 
                                
                            
                                
 
 - 
                    
                    
                    
 
 -