Class ConversationItemWithReference.Builder
-
- All Implemented Interfaces:
public final class ConversationItemWithReference.Builder
A builder for ConversationItemWithReference.
-
-
Method Summary
-
-
Method Detail
-
id
final ConversationItemWithReference.Builder id(String id)
For an item of type (
message
|function_call
|function_call_output
) this field allows the client to assign the unique ID of the item. It is not required because the server will generate one if not provided.For an item of type
item_reference
, this field is required and is a reference to any item that has previously existed in the conversation.
-
id
final ConversationItemWithReference.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 ConversationItemWithReference.Builder arguments(String arguments)
The arguments of the function call (for
function_call
items).
-
arguments
final ConversationItemWithReference.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 ConversationItemWithReference.Builder callId(String callId)
The ID of the function call (for
function_call
andfunction_call_output
items). If passed on afunction_call_output
item, the server will check that afunction_call
item with the same ID exists in the conversation history.
-
callId
final ConversationItemWithReference.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 ConversationItemWithReference.Builder content(List<ConversationItemContent> content)
The content of the message, applicable for
message
items.Message items of role
system
support onlyinput_text
contentMessage items of role
user
supportinput_text
andinput_audio
contentMessage items of role
assistant
supporttext
content.
-
content
final ConversationItemWithReference.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 ConversationItemWithReference.Builder addContent(ConversationItemContent content)
Adds a single ConversationItemContent to Builder.content.
-
name
final ConversationItemWithReference.Builder name(String name)
The name of the function being called (for
function_call
items).
-
name
final ConversationItemWithReference.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 ConversationItemWithReference.Builder object_(ConversationItemWithReference.Object object_)
Identifier for the API object being returned - always
realtime.item
.
-
object_
final ConversationItemWithReference.Builder object_(JsonField<ConversationItemWithReference.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 ConversationItemWithReference.Builder output(String output)
The output of the function call (for
function_call_output
items).
-
output
final ConversationItemWithReference.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 ConversationItemWithReference.Builder role(ConversationItemWithReference.Role role)
The role of the message sender (
user
,assistant
,system
), only applicable formessage
items.
-
role
final ConversationItemWithReference.Builder role(JsonField<ConversationItemWithReference.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 ConversationItemWithReference.Builder status(ConversationItemWithReference.Status status)
The status of the item (
completed
,incomplete
). These have no effect on the conversation, but are accepted for consistency with theconversation.item.created
event.
-
status
final ConversationItemWithReference.Builder status(JsonField<ConversationItemWithReference.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 ConversationItemWithReference.Builder type(ConversationItemWithReference.Type type)
The type of the item (
message
,function_call
,function_call_output
,item_reference
).
-
type
final ConversationItemWithReference.Builder type(JsonField<ConversationItemWithReference.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 ConversationItemWithReference.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ConversationItemWithReference.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ConversationItemWithReference.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ConversationItemWithReference.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ConversationItemWithReference.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ConversationItemWithReference build()
Returns an immutable instance of ConversationItemWithReference.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-