Class BetaThreadCreateAndRunParams.Thread.Message.Builder
-
- All Implemented Interfaces:
public final class BetaThreadCreateAndRunParams.Thread.Message.Builder
A builder for Message.
-
-
Method Summary
-
-
Method Detail
-
content
final BetaThreadCreateAndRunParams.Thread.Message.Builder content(BetaThreadCreateAndRunParams.Thread.Message.Content content)
The text contents of the message.
-
content
final BetaThreadCreateAndRunParams.Thread.Message.Builder content(JsonField<BetaThreadCreateAndRunParams.Thread.Message.Content> content)
The text contents of the message.
-
content
final BetaThreadCreateAndRunParams.Thread.Message.Builder content(String text)
The text contents of the message.
-
contentOfArrayOfContentParts
final BetaThreadCreateAndRunParams.Thread.Message.Builder contentOfArrayOfContentParts(List<MessageContentPartParam> arrayOfContentParts)
An array of content parts with a defined type, each can be of type
text
or images can be passed withimage_url
orimage_file
. Image types are only supported on Vision-compatible models.
-
role
final BetaThreadCreateAndRunParams.Thread.Message.Builder role(BetaThreadCreateAndRunParams.Thread.Message.Role role)
The role of the entity that is creating the message. Allowed values include:
user
: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.assistant
: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.
-
role
final BetaThreadCreateAndRunParams.Thread.Message.Builder role(JsonField<BetaThreadCreateAndRunParams.Thread.Message.Role> role)
The role of the entity that is creating the message. Allowed values include:
user
: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.assistant
: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.
-
attachments
final BetaThreadCreateAndRunParams.Thread.Message.Builder attachments(List<BetaThreadCreateAndRunParams.Thread.Message.Attachment> attachments)
A list of files attached to the message, and the tools they should be added to.
-
attachments
final BetaThreadCreateAndRunParams.Thread.Message.Builder attachments(Optional<List<BetaThreadCreateAndRunParams.Thread.Message.Attachment>> attachments)
A list of files attached to the message, and the tools they should be added to.
-
attachments
final BetaThreadCreateAndRunParams.Thread.Message.Builder attachments(JsonField<List<BetaThreadCreateAndRunParams.Thread.Message.Attachment>> attachments)
A list of files attached to the message, and the tools they should be added to.
-
addAttachment
final BetaThreadCreateAndRunParams.Thread.Message.Builder addAttachment(BetaThreadCreateAndRunParams.Thread.Message.Attachment attachment)
A list of files attached to the message, and the tools they should be added to.
-
metadata
final BetaThreadCreateAndRunParams.Thread.Message.Builder metadata(Metadata 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, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
metadata
final BetaThreadCreateAndRunParams.Thread.Message.Builder metadata(Optional<Metadata> 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, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
metadata
final BetaThreadCreateAndRunParams.Thread.Message.Builder metadata(JsonField<Metadata> 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, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
additionalProperties
final BetaThreadCreateAndRunParams.Thread.Message.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaThreadCreateAndRunParams.Thread.Message.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaThreadCreateAndRunParams.Thread.Message.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaThreadCreateAndRunParams.Thread.Message.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaThreadCreateAndRunParams.Thread.Message.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaThreadCreateAndRunParams.Thread.Message build()
-
-
-
-