Package-level declarations

Functions

Link copied to clipboard
fun Message.hasToolCalls(): Boolean

True if the message carries at least one tool call part.

Link copied to clipboard
fun Message.hasToolResults(): Boolean

True if the message carries at least one tool result part.

Link copied to clipboard
fun MessagePart.render(): String?

Renders a single part, or null if it carries no textual information.

Link copied to clipboard
fun Message.renderParts(separator: String = ""): String

Renders a message's parts as a single human-readable line.

Link copied to clipboard
fun Message.toolCalls(): List<MessagePart.Tool.Call>

All tool calls carried by this message.

Link copied to clipboard
fun Message.toolResults(): List<MessagePart.Tool.Result>

All tool results carried by this message.

Link copied to clipboard
fun Message.withParts(parts: List<MessagePart>): Message

Returns a copy of this message with its parts replaced, keeping only the parts the message role can actually carry.