Class Message.Builder
-
- All Implemented Interfaces:
public final class Message.Builder
-
-
Constructor Summary
Constructors Constructor Description Message.Builder()
-
Method Summary
Modifier and Type Method Description final Message.Builder
id(String id)
The identifier, which can be referenced in API endpoints. final Message.Builder
id(JsonField<String> id)
The identifier, which can be referenced in API endpoints. final Message.Builder
assistantId(String assistantId)
If applicable, the ID of the assistant that authored this message. final Message.Builder
assistantId(Optional<String> assistantId)
If applicable, the ID of the assistant that authored this message. final Message.Builder
assistantId(JsonField<String> assistantId)
If applicable, the ID of the assistant that authored this message. final Message.Builder
attachments(List<Message.Attachment> attachments)
A list of files attached to the message, and the tools they were added to. final Message.Builder
attachments(Optional<List<Message.Attachment>> attachments)
A list of files attached to the message, and the tools they were added to. final Message.Builder
attachments(JsonField<List<Message.Attachment>> attachments)
A list of files attached to the message, and the tools they were added to. final Message.Builder
addAttachment(Message.Attachment attachment)
A list of files attached to the message, and the tools they were added to. final Message.Builder
completedAt(Long completedAt)
The Unix timestamp (in seconds) for when the message was completed. final Message.Builder
completedAt(Long completedAt)
The Unix timestamp (in seconds) for when the message was completed. final Message.Builder
completedAt(Optional<Long> completedAt)
The Unix timestamp (in seconds) for when the message was completed. final Message.Builder
completedAt(JsonField<Long> completedAt)
The Unix timestamp (in seconds) for when the message was completed. final Message.Builder
content(List<MessageContent> content)
The content of the message in array of text and/or images. final Message.Builder
content(JsonField<List<MessageContent>> content)
The content of the message in array of text and/or images. final Message.Builder
addContent(MessageContent content)
The content of the message in array of text and/or images. final Message.Builder
addContent(ImageFileContentBlock imageFileContentBlock)
References an image File in the content of a message. final Message.Builder
addContent(ImageUrlContentBlock imageUrlContentBlock)
References an image URL in the content of a message. final Message.Builder
addContent(TextContentBlock textContentBlock)
The text content that is part of a message. final Message.Builder
addContent(RefusalContentBlock refusalContentBlock)
The refusal content generated by the assistant. final Message.Builder
createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the message was created. final Message.Builder
createdAt(JsonField<Long> createdAt)
The Unix timestamp (in seconds) for when the message was created. final Message.Builder
incompleteAt(Long incompleteAt)
The Unix timestamp (in seconds) for when the message was marked as incomplete. final Message.Builder
incompleteAt(Long incompleteAt)
The Unix timestamp (in seconds) for when the message was marked as incomplete. final Message.Builder
incompleteAt(Optional<Long> incompleteAt)
The Unix timestamp (in seconds) for when the message was marked as incomplete. final Message.Builder
incompleteAt(JsonField<Long> incompleteAt)
The Unix timestamp (in seconds) for when the message was marked as incomplete. final Message.Builder
incompleteDetails(Message.IncompleteDetails incompleteDetails)
On an incomplete message, details about why the message is incomplete. final Message.Builder
incompleteDetails(Optional<Message.IncompleteDetails> incompleteDetails)
On an incomplete message, details about why the message is incomplete. final Message.Builder
incompleteDetails(JsonField<Message.IncompleteDetails> incompleteDetails)
On an incomplete message, details about why the message is incomplete. final Message.Builder
metadata(JsonValue metadata)
Set of 16 key-value pairs that can be attached to an object. final Message.Builder
object_(Message.Object object_)
The object type, which is always thread.message
.final Message.Builder
object_(JsonField<Message.Object> object_)
The object type, which is always thread.message
.final Message.Builder
role(Message.Role role)
The entity that produced the message. final Message.Builder
role(JsonField<Message.Role> role)
The entity that produced the message. final Message.Builder
runId(String runId)
The ID of the run associated with the creation of this message. final Message.Builder
runId(Optional<String> runId)
The ID of the run associated with the creation of this message. final Message.Builder
runId(JsonField<String> runId)
The ID of the run associated with the creation of this message. final Message.Builder
status(Message.Status status)
The status of the message, which can be either in_progress
,incomplete
, orcompleted
.final Message.Builder
status(JsonField<Message.Status> status)
The status of the message, which can be either in_progress
,incomplete
, orcompleted
.final Message.Builder
threadId(String threadId)
The thread ID that this message belongs to. final Message.Builder
threadId(JsonField<String> threadId)
The thread ID that this message belongs to. final Message.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final Message.Builder
putAdditionalProperty(String key, JsonValue value)
final Message.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final Message.Builder
removeAdditionalProperty(String key)
final Message.Builder
removeAllAdditionalProperties(Set<String> keys)
final Message
build()
-
-
Method Detail
-
id
final Message.Builder id(String id)
The identifier, which can be referenced in API endpoints.
-
id
final Message.Builder id(JsonField<String> id)
The identifier, which can be referenced in API endpoints.
-
assistantId
final Message.Builder assistantId(String assistantId)
If applicable, the ID of the assistant that authored this message.
-
assistantId
final Message.Builder assistantId(Optional<String> assistantId)
If applicable, the ID of the assistant that authored this message.
-
assistantId
final Message.Builder assistantId(JsonField<String> assistantId)
If applicable, the ID of the assistant that authored this message.
-
attachments
final Message.Builder attachments(List<Message.Attachment> attachments)
A list of files attached to the message, and the tools they were added to.
-
attachments
final Message.Builder attachments(Optional<List<Message.Attachment>> attachments)
A list of files attached to the message, and the tools they were added to.
-
attachments
final Message.Builder attachments(JsonField<List<Message.Attachment>> attachments)
A list of files attached to the message, and the tools they were added to.
-
addAttachment
final Message.Builder addAttachment(Message.Attachment attachment)
A list of files attached to the message, and the tools they were added to.
-
completedAt
final Message.Builder completedAt(Long completedAt)
The Unix timestamp (in seconds) for when the message was completed.
-
completedAt
final Message.Builder completedAt(Long completedAt)
The Unix timestamp (in seconds) for when the message was completed.
-
completedAt
final Message.Builder completedAt(Optional<Long> completedAt)
The Unix timestamp (in seconds) for when the message was completed.
-
completedAt
final Message.Builder completedAt(JsonField<Long> completedAt)
The Unix timestamp (in seconds) for when the message was completed.
-
content
final Message.Builder content(List<MessageContent> content)
The content of the message in array of text and/or images.
-
content
final Message.Builder content(JsonField<List<MessageContent>> content)
The content of the message in array of text and/or images.
-
addContent
final Message.Builder addContent(MessageContent content)
The content of the message in array of text and/or images.
-
addContent
final Message.Builder addContent(ImageFileContentBlock imageFileContentBlock)
References an image File in the content of a message.
-
addContent
final Message.Builder addContent(ImageUrlContentBlock imageUrlContentBlock)
References an image URL in the content of a message.
-
addContent
final Message.Builder addContent(TextContentBlock textContentBlock)
The text content that is part of a message.
-
addContent
final Message.Builder addContent(RefusalContentBlock refusalContentBlock)
The refusal content generated by the assistant.
-
createdAt
final Message.Builder createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the message was created.
-
createdAt
final Message.Builder createdAt(JsonField<Long> createdAt)
The Unix timestamp (in seconds) for when the message was created.
-
incompleteAt
final Message.Builder incompleteAt(Long incompleteAt)
The Unix timestamp (in seconds) for when the message was marked as incomplete.
-
incompleteAt
final Message.Builder incompleteAt(Long incompleteAt)
The Unix timestamp (in seconds) for when the message was marked as incomplete.
-
incompleteAt
final Message.Builder incompleteAt(Optional<Long> incompleteAt)
The Unix timestamp (in seconds) for when the message was marked as incomplete.
-
incompleteAt
final Message.Builder incompleteAt(JsonField<Long> incompleteAt)
The Unix timestamp (in seconds) for when the message was marked as incomplete.
-
incompleteDetails
final Message.Builder incompleteDetails(Message.IncompleteDetails incompleteDetails)
On an incomplete message, details about why the message is incomplete.
-
incompleteDetails
final Message.Builder incompleteDetails(Optional<Message.IncompleteDetails> incompleteDetails)
On an incomplete message, details about why the message is incomplete.
-
incompleteDetails
final Message.Builder incompleteDetails(JsonField<Message.IncompleteDetails> incompleteDetails)
On an incomplete message, details about why the message is incomplete.
-
metadata
final Message.Builder metadata(JsonValue metadata)
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.
-
object_
final Message.Builder object_(Message.Object object_)
The object type, which is always
thread.message
.
-
object_
final Message.Builder object_(JsonField<Message.Object> object_)
The object type, which is always
thread.message
.
-
role
final Message.Builder role(Message.Role role)
The entity that produced the message. One of
user
orassistant
.
-
role
final Message.Builder role(JsonField<Message.Role> role)
The entity that produced the message. One of
user
orassistant
.
-
runId
final Message.Builder runId(String runId)
The ID of the run associated with the creation of this message. Value is
null
when messages are created manually using the create message or create thread endpoints.
-
runId
final Message.Builder runId(Optional<String> runId)
The ID of the run associated with the creation of this message. Value is
null
when messages are created manually using the create message or create thread endpoints.
-
runId
final Message.Builder runId(JsonField<String> runId)
The ID of the run associated with the creation of this message. Value is
null
when messages are created manually using the create message or create thread endpoints.
-
status
final Message.Builder status(Message.Status status)
The status of the message, which can be either
in_progress
,incomplete
, orcompleted
.
-
status
final Message.Builder status(JsonField<Message.Status> status)
The status of the message, which can be either
in_progress
,incomplete
, orcompleted
.
-
threadId
final Message.Builder threadId(String threadId)
The thread ID that this message belongs to.
-
threadId
final Message.Builder threadId(JsonField<String> threadId)
The thread ID that this message belongs to.
-
additionalProperties
final Message.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final Message.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final Message.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final Message.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final Message.Builder removeAllAdditionalProperties(Set<String> keys)
-
-
-
-