UserMessage

constructor(content: UserContent?, name: String? = null)


constructor(content: String?, name: String? = null)

Creates a plain-text user message.

Parameters

content

User's text input

name

Optional participant name forwarded to the model


constructor(parts: List<ContentPart>, name: String? = null)

Creates a multimodal user message.

Parameters

parts

Content parts, in the order the model should see them

name

Optional participant name forwarded to the model