content
content(String). A subclass builder must set it
through that method: on a builder that also holds parts, a value assigned to
the field directly is ignored.B - the concrete builder type, for subclass buildersDeepSeekAssistantMessage.AbstractBuilderAssistantMessage.
Parts added through part(MessagePart), parts(List) and
reasoning(ReasoningPart) keep the order they were added in. The legacy
setters replace the parts of their type at build() time:
content(String) replaces the text parts, toolCalls(List) the tool
call parts and media(List) the media parts. The new parts take the place
of the first part of that type, or go where the legacy order has them when there is
none (text before tool calls and media, tool calls before media), and a
null content or an empty list removes the parts of that type. The setters
take effect at build() time, so they also replace parts of their type
added after the setter was called. A builder without explicit parts therefore
produces the legacy order (text, tool calls, media) whatever the setter call order.
protected @Nullable Stringcontent(String).protected final List<MessagePart>media(List).protected List<AssistantMessage.ToolCall>toolCalls(List).build()protected List<MessagePart>part(MessagePart part) parts(List<MessagePart> parts) properties(Map<String,Object> properties) reasoning(List<ReasoningPart> reasoning) reasoning(ReasoningPart reasoning) protected Bself()protected booleantoolCalls(List<AssistantMessage.ToolCall> toolCalls) content(String). A subclass builder must set it
through that method: on a builder that also holds parts, a value assigned to
the field directly is ignored.toolCalls(List). As for content, a
subclass builder must set them through that method.media(List). As for content, a subclass
builder must set them through that method.part - the partbuild() of this builder honors part(MessagePart),
parts(List) and reasoning(ReasoningPart). The base builder
does. A subclass builder that overrides build() must override this
method to return true and construct its message from
buildParts(); otherwise part(MessagePart) throws so parts are
never dropped silently.parts - the partsreasoning - the reasoning partreasoning - the reasoning parts