Class MessageDelta.Builder
-
- All Implemented Interfaces:
public final class MessageDelta.Builder
A builder for MessageDelta.
-
-
Method Summary
Modifier and Type Method Description final MessageDelta.Builder
content(List<MessageContentDelta> content)
The content of the message in array of text and/or images. final MessageDelta.Builder
content(JsonField<List<MessageContentDelta>> content)
Sets Builder.content to an arbitrary JSON value. final MessageDelta.Builder
addContent(MessageContentDelta content)
Adds a single MessageContentDelta to Builder.content. final MessageDelta.Builder
addContent(ImageFileDeltaBlock imageFile)
Alias for calling addContent with MessageContentDelta.ofImageFile(imageFile)
.final MessageDelta.Builder
addContent(TextDeltaBlock text)
Alias for calling addContent with MessageContentDelta.ofText(text)
.final MessageDelta.Builder
addContent(RefusalDeltaBlock refusal)
Alias for calling addContent with MessageContentDelta.ofRefusal(refusal)
.final MessageDelta.Builder
addContent(ImageUrlDeltaBlock imageUrl)
Alias for calling addContent with MessageContentDelta.ofImageUrl(imageUrl)
.final MessageDelta.Builder
addImageFileContent(Long index)
Alias for calling addContent with the following: ImageFileDeltaBlock.builder() .index(index) .build()
final MessageDelta.Builder
addTextContent(Long index)
Alias for calling addContent with the following: TextDeltaBlock.builder() .index(index) .build()
final MessageDelta.Builder
addRefusalContent(Long index)
Alias for calling addContent with the following: RefusalDeltaBlock.builder() .index(index) .build()
final MessageDelta.Builder
addImageUrlContent(Long index)
Alias for calling addContent with the following: ImageUrlDeltaBlock.builder() .index(index) .build()
final MessageDelta.Builder
role(MessageDelta.Role role)
The entity that produced the message. final MessageDelta.Builder
role(JsonField<MessageDelta.Role> role)
Sets Builder.role to an arbitrary JSON value. final MessageDelta.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final MessageDelta.Builder
putAdditionalProperty(String key, JsonValue value)
final MessageDelta.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final MessageDelta.Builder
removeAdditionalProperty(String key)
final MessageDelta.Builder
removeAllAdditionalProperties(Set<String> keys)
final MessageDelta
build()
Returns an immutable instance of MessageDelta. -
-
Method Detail
-
content
final MessageDelta.Builder content(List<MessageContentDelta> content)
The content of the message in array of text and/or images.
-
content
final MessageDelta.Builder content(JsonField<List<MessageContentDelta>> content)
Sets Builder.content to an arbitrary JSON value.
You should usually call Builder.content with a well-typed
List<MessageContentDelta>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addContent
final MessageDelta.Builder addContent(MessageContentDelta content)
Adds a single MessageContentDelta to Builder.content.
-
addContent
final MessageDelta.Builder addContent(ImageFileDeltaBlock imageFile)
Alias for calling addContent with
MessageContentDelta.ofImageFile(imageFile)
.
-
addContent
final MessageDelta.Builder addContent(TextDeltaBlock text)
Alias for calling addContent with
MessageContentDelta.ofText(text)
.
-
addContent
final MessageDelta.Builder addContent(RefusalDeltaBlock refusal)
Alias for calling addContent with
MessageContentDelta.ofRefusal(refusal)
.
-
addContent
final MessageDelta.Builder addContent(ImageUrlDeltaBlock imageUrl)
Alias for calling addContent with
MessageContentDelta.ofImageUrl(imageUrl)
.
-
addImageFileContent
final MessageDelta.Builder addImageFileContent(Long index)
Alias for calling addContent with the following:
ImageFileDeltaBlock.builder() .index(index) .build()
-
addTextContent
final MessageDelta.Builder addTextContent(Long index)
Alias for calling addContent with the following:
TextDeltaBlock.builder() .index(index) .build()
-
addRefusalContent
final MessageDelta.Builder addRefusalContent(Long index)
Alias for calling addContent with the following:
RefusalDeltaBlock.builder() .index(index) .build()
-
addImageUrlContent
final MessageDelta.Builder addImageUrlContent(Long index)
Alias for calling addContent with the following:
ImageUrlDeltaBlock.builder() .index(index) .build()
-
role
final MessageDelta.Builder role(MessageDelta.Role role)
The entity that produced the message. One of
user
orassistant
.
-
role
final MessageDelta.Builder role(JsonField<MessageDelta.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.
-
additionalProperties
final MessageDelta.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final MessageDelta.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final MessageDelta.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final MessageDelta.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final MessageDelta.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final MessageDelta build()
Returns an immutable instance of MessageDelta.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-