AssistantMessageBuilder

Builder for creating Message.Assistant instances from Java code.

Usage from Java:

Message.Assistant message = MessageBuilder.assistant()
.content("Hello!")
.timestamp(Instant.now())
.finishReason("stop")
.build();

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Adds a content part to the message.

Link copied to clipboard

Builds a new Message.Assistant instance.

Link copied to clipboard

Sets a single text content for the message, replacing any previously added parts.

Link copied to clipboard

Sets the finish reason.

Link copied to clipboard

Sets the input token count.

Link copied to clipboard

Sets the metadata.

Link copied to clipboard

Sets the output token count.

Link copied to clipboard

Sets the timestamp using java.time.Instant.

Sets the timestamp using kotlin.time.Instant.

Link copied to clipboard

Sets the total token count.