TextPart

Represents text or string based data sent to and received from requests.

Constructors

Link copied to clipboard
constructor(text: String)
constructor(text: String, speechMetadata: SpeechMetadata)

A text part with speechMetadata, how the model speaks text when it generates speech.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val isThought: Boolean
Link copied to clipboard

How the text is spoken when the model generates speech from it.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the part as a FileDataPart if it represents a file, and null otherwise

Link copied to clipboard

Returns the part as a InlineDataPart if it represents inline data, and null otherwise

Link copied to clipboard

Returns the part as a String if it represents text, and null otherwise