Class ConversationItemWithReference
-
- All Implemented Interfaces:
public final class ConversationItemWithReference
The item to add to the conversation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ConversationItemWithReference.Builder
A builder for ConversationItemWithReference.
public final class
ConversationItemWithReference.Content
public final class
ConversationItemWithReference.Object
Identifier for the API object being returned - always
realtime.item
.public final class
ConversationItemWithReference.Role
The role of the message sender (
user
,assistant
,system
), only applicable formessage
items.public final class
ConversationItemWithReference.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.created
event.public final class
ConversationItemWithReference.Type
The type of the item (
message
,function_call
,function_call_output
,item_reference
).
-
Method Summary
Modifier and Type Method Description final Optional<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.final Optional<String>
arguments()
The arguments of the function call (for function_call
items).final Optional<String>
callId()
The ID of the function call (for function_call
andfunction_call_output
items).final Optional<List<ConversationItemWithReference.Content>>
content()
The content of the message, applicable for message
items.final Optional<String>
name()
The name of the function being called (for function_call
items).final Optional<ConversationItemWithReference.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_output
items).final Optional<ConversationItemWithReference.Role>
role()
The role of the message sender ( user
,assistant
,system
), only applicable formessage
items.final Optional<ConversationItemWithReference.Status>
status()
The status of the item ( completed
,incomplete
,in_progress
).final Optional<ConversationItemWithReference.Type>
type()
The type of the item ( message
,function_call
,function_call_output
,item_reference
).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<ConversationItemWithReference.Content>>
_content()
Returns the raw JSON value of content. final JsonField<String>
_name()
Returns the raw JSON value of name. final JsonField<ConversationItemWithReference.Object>
_object_()
Returns the raw JSON value of object_. final JsonField<String>
_output()
Returns the raw JSON value of output. final JsonField<ConversationItemWithReference.Role>
_role()
Returns the raw JSON value of role. final JsonField<ConversationItemWithReference.Status>
_status()
Returns the raw JSON value of status. final JsonField<ConversationItemWithReference.Type>
_type()
Returns the raw JSON value of type. final Map<String, JsonValue>
_additionalProperties()
final ConversationItemWithReference.Builder
toBuilder()
final ConversationItemWithReference
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ConversationItemWithReference.Builder
builder()
Returns a mutable builder for constructing an instance of ConversationItemWithReference. -
-
Method Detail
-
id
final Optional<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.
-
arguments
final Optional<String> arguments()
The arguments of the function call (for
function_call
items).
-
callId
final Optional<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.
-
content
final Optional<List<ConversationItemWithReference.Content>> 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.
-
object_
final Optional<ConversationItemWithReference.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_output
items).
-
role
final Optional<ConversationItemWithReference.Role> role()
The role of the message sender (
user
,assistant
,system
), only applicable formessage
items.
-
status
final Optional<ConversationItemWithReference.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.created
event.
-
type
final Optional<ConversationItemWithReference.Type> type()
The type of the item (
message
,function_call
,function_call_output
,item_reference
).
-
_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<ConversationItemWithReference.Content>> _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<ConversationItemWithReference.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<ConversationItemWithReference.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<ConversationItemWithReference.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<ConversationItemWithReference.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 ConversationItemWithReference.Builder toBuilder()
-
validate
final ConversationItemWithReference validate()
-
builder
final static ConversationItemWithReference.Builder builder()
Returns a mutable builder for constructing an instance of ConversationItemWithReference.
-
-
-
-