Class MessageCreateParams.Body.Builder
-
- All Implemented Interfaces:
public final class MessageCreateParams.Body.BuilderA builder for Body.
-
-
Method Summary
Modifier and Type Method Description final MessageCreateParams.Body.Buildercontent(MessageCreateParams.Content content)The text contents of the message. final MessageCreateParams.Body.Buildercontent(JsonField<MessageCreateParams.Content> content)The text contents of the message. final MessageCreateParams.Body.Buildercontent(String text)The text contents of the message. final MessageCreateParams.Body.BuildercontentOfArrayOfContentParts(List<MessageContentPartParam> arrayOfContentParts)An array of content parts with a defined type, each can be of type textor images can be passed withimage_urlorimage_file.final MessageCreateParams.Body.Builderrole(MessageCreateParams.Role role)The role of the entity that is creating the message. final MessageCreateParams.Body.Builderrole(JsonField<MessageCreateParams.Role> role)The role of the entity that is creating the message. final MessageCreateParams.Body.Builderattachments(List<MessageCreateParams.Attachment> attachments)A list of files attached to the message, and the tools they should be added to. final MessageCreateParams.Body.Builderattachments(Optional<List<MessageCreateParams.Attachment>> attachments)A list of files attached to the message, and the tools they should be added to. final MessageCreateParams.Body.Builderattachments(JsonField<List<MessageCreateParams.Attachment>> attachments)A list of files attached to the message, and the tools they should be added to. final MessageCreateParams.Body.BuilderaddAttachment(MessageCreateParams.Attachment attachment)A list of files attached to the message, and the tools they should be added to. final MessageCreateParams.Body.Buildermetadata(Metadata metadata)Set of 16 key-value pairs that can be attached to an object. final MessageCreateParams.Body.Buildermetadata(Optional<Metadata> metadata)Set of 16 key-value pairs that can be attached to an object. final MessageCreateParams.Body.Buildermetadata(JsonField<Metadata> metadata)Set of 16 key-value pairs that can be attached to an object. final MessageCreateParams.Body.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final MessageCreateParams.Body.BuilderputAdditionalProperty(String key, JsonValue value)final MessageCreateParams.Body.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final MessageCreateParams.Body.BuilderremoveAdditionalProperty(String key)final MessageCreateParams.Body.BuilderremoveAllAdditionalProperties(Set<String> keys)final MessageCreateParams.Bodybuild()-
-
Method Detail
-
content
final MessageCreateParams.Body.Builder content(MessageCreateParams.Content content)
The text contents of the message.
-
content
final MessageCreateParams.Body.Builder content(JsonField<MessageCreateParams.Content> content)
The text contents of the message.
-
content
final MessageCreateParams.Body.Builder content(String text)
The text contents of the message.
-
contentOfArrayOfContentParts
final MessageCreateParams.Body.Builder contentOfArrayOfContentParts(List<MessageContentPartParam> arrayOfContentParts)
An array of content parts with a defined type, each can be of type
textor images can be passed withimage_urlorimage_file. Image types are only supported on Vision-compatible models.
-
role
final MessageCreateParams.Body.Builder role(MessageCreateParams.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 MessageCreateParams.Body.Builder role(JsonField<MessageCreateParams.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 MessageCreateParams.Body.Builder attachments(List<MessageCreateParams.Attachment> attachments)
A list of files attached to the message, and the tools they should be added to.
-
attachments
final MessageCreateParams.Body.Builder attachments(Optional<List<MessageCreateParams.Attachment>> attachments)
A list of files attached to the message, and the tools they should be added to.
-
attachments
final MessageCreateParams.Body.Builder attachments(JsonField<List<MessageCreateParams.Attachment>> attachments)
A list of files attached to the message, and the tools they should be added to.
-
addAttachment
final MessageCreateParams.Body.Builder addAttachment(MessageCreateParams.Attachment attachment)
A list of files attached to the message, and the tools they should be added to.
-
metadata
final MessageCreateParams.Body.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 MessageCreateParams.Body.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 MessageCreateParams.Body.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 MessageCreateParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final MessageCreateParams.Body.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final MessageCreateParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final MessageCreateParams.Body.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final MessageCreateParams.Body.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final MessageCreateParams.Body build()
-
-
-
-