UserMessage

Message sent by the user - supports multimodal content

Constructors

Link copied to clipboard
constructor(parts: List<ContentPart>, name: String? = null, timestamp: Instant = Instant.now())

Primary constructor for multimodal messages

constructor(content: String, name: String? = null, timestamp: Instant = Instant.now())

Convenience constructor for text-only messages (backward compatibility)

Properties

Link copied to clipboard
open val content: String

Maintains backward compatibility with HasContent interface. Returns concatenated text from all TextParts.

Link copied to clipboard

Returns all image parts in this message.

Link copied to clipboard

Returns true if this message contains any non-text content.

Link copied to clipboard
val name: String? = null
Link copied to clipboard
Link copied to clipboard
val role: Role
Link copied to clipboard
Link copied to clipboard

Returns the text content of the message by concatenating all TextParts.

Link copied to clipboard
open val timestamp: Instant

Functions

Link copied to clipboard
fun Message.toSpringAiMessage(): <Error class: unknown class>

Convert one of our messages to a Spring AI message with multimodal support.

Link copied to clipboard
open override fun toString(): String