Class RunCreateParams.AdditionalMessage.Builder
-
- All Implemented Interfaces:
public final class RunCreateParams.AdditionalMessage.Builder
A builder for AdditionalMessage.
-
-
Method Summary
-
-
Method Detail
-
content
final RunCreateParams.AdditionalMessage.Builder content(RunCreateParams.AdditionalMessage.Content content)
The text contents of the message.
-
content
final RunCreateParams.AdditionalMessage.Builder content(JsonField<RunCreateParams.AdditionalMessage.Content> content)
Sets Builder.content to an arbitrary JSON value.
You should usually call Builder.content with a well-typed Content value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
content
final RunCreateParams.AdditionalMessage.Builder content(String text)
Alias for calling content with
Content.ofText(text)
.
-
contentOfArrayOfContentParts
final RunCreateParams.AdditionalMessage.Builder contentOfArrayOfContentParts(List<MessageContentPartParam> arrayOfContentParts)
Alias for calling content with
Content.ofArrayOfContentParts(arrayOfContentParts)
.
-
role
final RunCreateParams.AdditionalMessage.Builder role(RunCreateParams.AdditionalMessage.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 RunCreateParams.AdditionalMessage.Builder role(JsonField<RunCreateParams.AdditionalMessage.Role> role)
Sets Builder.role to an arbitrary JSON value.
You should usually call Builder.role with a well-typed Role value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
attachments
final RunCreateParams.AdditionalMessage.Builder attachments(List<RunCreateParams.AdditionalMessage.Attachment> attachments)
A list of files attached to the message, and the tools they should be added to.
-
attachments
final RunCreateParams.AdditionalMessage.Builder attachments(Optional<List<RunCreateParams.AdditionalMessage.Attachment>> attachments)
Alias for calling Builder.attachments with
attachments.orElse(null)
.
-
attachments
final RunCreateParams.AdditionalMessage.Builder attachments(JsonField<List<RunCreateParams.AdditionalMessage.Attachment>> attachments)
Sets Builder.attachments to an arbitrary JSON value.
You should usually call Builder.attachments with a well-typed
List<Attachment>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addAttachment
final RunCreateParams.AdditionalMessage.Builder addAttachment(RunCreateParams.AdditionalMessage.Attachment attachment)
Adds a single Attachment to attachments.
-
metadata
final RunCreateParams.AdditionalMessage.Builder metadata(RunCreateParams.AdditionalMessage.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 RunCreateParams.AdditionalMessage.Builder metadata(Optional<RunCreateParams.AdditionalMessage.Metadata> metadata)
Alias for calling Builder.metadata with
metadata.orElse(null)
.
-
metadata
final RunCreateParams.AdditionalMessage.Builder metadata(JsonField<RunCreateParams.AdditionalMessage.Metadata> metadata)
Sets Builder.metadata to an arbitrary JSON value.
You should usually call Builder.metadata with a well-typed Metadata value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final RunCreateParams.AdditionalMessage.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final RunCreateParams.AdditionalMessage.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final RunCreateParams.AdditionalMessage.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final RunCreateParams.AdditionalMessage.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final RunCreateParams.AdditionalMessage.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final RunCreateParams.AdditionalMessage build()
Returns an immutable instance of AdditionalMessage.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.content() .role()
-
-
-
-