MessageItem

constructor(role: ResponseRole, content: ResponseContent?, id: String? = null, status: ResponseStatus? = null)


constructor(role: ResponseRole, content: String, id: String? = null, status: ResponseStatus? = null)

Creates a plain-text message item.

Parameters

role

Author of the message

content

Message text

id

Identifier of an item echoed back from a previous response

status

Generation state of an item echoed back from a previous response


constructor(role: ResponseRole, parts: List<ResponseContentPart>, id: String? = null, status: ResponseStatus? = null)

Creates a multimodal message item.

Parameters

role

Author of the message

parts

Content parts, in the order the model should see them

id

Identifier of an item echoed back from a previous response

status

Generation state of an item echoed back from a previous response