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.Builderid(String id)The identifier, which can be referenced in API endpoints. final Message.Builderid(JsonField<String> id)The identifier, which can be referenced in API endpoints. final Message.BuilderassistantId(String assistantId)If applicable, the ID of the assistant that authored this message. final Message.BuilderassistantId(Optional<String> assistantId)If applicable, the ID of the assistant that authored this message. final Message.BuilderassistantId(JsonField<String> assistantId)If applicable, the ID of the assistant that authored this message. final Message.Builderattachments(List<Message.Attachment> attachments)A list of files attached to the message, and the tools they were added to. final Message.Builderattachments(Optional<List<Message.Attachment>> attachments)A list of files attached to the message, and the tools they were added to. final Message.Builderattachments(JsonField<List<Message.Attachment>> attachments)A list of files attached to the message, and the tools they were added to. final Message.BuilderaddAttachment(Message.Attachment attachment)A list of files attached to the message, and the tools they were added to. final Message.BuildercompletedAt(Long completedAt)The Unix timestamp (in seconds) for when the message was completed. final Message.BuildercompletedAt(Long completedAt)The Unix timestamp (in seconds) for when the message was completed. final Message.BuildercompletedAt(Optional<Long> completedAt)The Unix timestamp (in seconds) for when the message was completed. final Message.BuildercompletedAt(JsonField<Long> completedAt)The Unix timestamp (in seconds) for when the message was completed. final Message.Buildercontent(List<MessageContent> content)The content of the message in array of text and/or images. final Message.Buildercontent(JsonField<List<MessageContent>> content)The content of the message in array of text and/or images. final Message.BuilderaddContent(MessageContent content)The content of the message in array of text and/or images. final Message.BuilderaddContent(ImageFileContentBlock imageFileContentBlock)References an image File in the content of a message. final Message.BuilderaddContent(ImageUrlContentBlock imageUrlContentBlock)References an image URL in the content of a message. final Message.BuilderaddContent(TextContentBlock textContentBlock)The text content that is part of a message. final Message.BuilderaddContent(RefusalContentBlock refusalContentBlock)The refusal content generated by the assistant. final Message.BuildercreatedAt(Long createdAt)The Unix timestamp (in seconds) for when the message was created. final Message.BuildercreatedAt(JsonField<Long> createdAt)The Unix timestamp (in seconds) for when the message was created. final Message.BuilderincompleteAt(Long incompleteAt)The Unix timestamp (in seconds) for when the message was marked as incomplete. final Message.BuilderincompleteAt(Long incompleteAt)The Unix timestamp (in seconds) for when the message was marked as incomplete. final Message.BuilderincompleteAt(Optional<Long> incompleteAt)The Unix timestamp (in seconds) for when the message was marked as incomplete. final Message.BuilderincompleteAt(JsonField<Long> incompleteAt)The Unix timestamp (in seconds) for when the message was marked as incomplete. final Message.BuilderincompleteDetails(Message.IncompleteDetails incompleteDetails)On an incomplete message, details about why the message is incomplete. final Message.BuilderincompleteDetails(Optional<Message.IncompleteDetails> incompleteDetails)On an incomplete message, details about why the message is incomplete. final Message.BuilderincompleteDetails(JsonField<Message.IncompleteDetails> incompleteDetails)On an incomplete message, details about why the message is incomplete. final Message.Buildermetadata(JsonValue metadata)Set of 16 key-value pairs that can be attached to an object. final Message.Builderobject_(JsonValue object_)The object type, which is always thread.message.final Message.Builderrole(Message.Role role)The entity that produced the message. final Message.Builderrole(JsonField<Message.Role> role)The entity that produced the message. final Message.BuilderrunId(String runId)The ID of the run associated with the creation of this message. final Message.BuilderrunId(Optional<String> runId)The ID of the run associated with the creation of this message. final Message.BuilderrunId(JsonField<String> runId)The ID of the run associated with the creation of this message. final Message.Builderstatus(Message.Status status)The status of the message, which can be either in_progress,incomplete, orcompleted.final Message.Builderstatus(JsonField<Message.Status> status)The status of the message, which can be either in_progress,incomplete, orcompleted.final Message.BuilderthreadId(String threadId)The thread ID that this message belongs to. final Message.BuilderthreadId(JsonField<String> threadId)The thread ID that this message belongs to. final Message.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final Message.BuilderputAdditionalProperty(String key, JsonValue value)final Message.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final Message.BuilderremoveAdditionalProperty(String key)final Message.BuilderremoveAllAdditionalProperties(Set<String> keys)final Messagebuild()-
-
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_(JsonValue 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
userorassistant.
-
role
final Message.Builder role(JsonField<Message.Role> role)
The entity that produced the message. One of
userorassistant.
-
runId
final Message.Builder runId(String runId)
The ID of the run associated with the creation of this message. Value is
nullwhen 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
nullwhen 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
nullwhen 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)
-
-
-
-