Content

data class Content(val role: String? = null, val parts: List<Part> = emptyList())

Represents the content of a response, including its role and parts.

Constructors

Link copied to clipboard
constructor(role: String? = null, parts: List<Part> = emptyList())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The parts of the content.

Link copied to clipboard
val role: String?

The role of the content.

Functions

Link copied to clipboard
fun text(separator: CharSequence = "", includeThoughts: Boolean = false): String

Returns the text of every text Part joined with separator (none by default), skipping parts that carry no text and, unless includeThoughts is true, parts marked as thoughts.