Assistant
data class Assistant(val parts: List<ContentPart>, val metaInfo: ResponseMetaInfo, val finishReason: String? = null) : Message.Response(source)
Represents a message generated by the assistant as a response.
Constructors
Properties
Link copied to clipboard
The textual content of the message aggregated from all ContentPart.Text parts joined to String separated by newlines.
Link copied to clipboard
An optional explanation for why the assistant's response was finalized. Defaults to null if not provided.
Link copied to clipboard
Metadata related to the response, including token counts and timestamp.
Link copied to clipboard
The parts of the assistant's response.
Link copied to clipboard
The role associated with the response, which is fixed as Role.Assistant.
Functions
Link copied to clipboard
Creates a copy of the current Response instance with updated metadata.
Link copied to clipboard
Checks weather the message consists of attachments.
Link copied to clipboard
Checks weather the message consists of only sungle text content.
Link copied to clipboard
Converts a Message.Response to a StreamFrame.