TextPart

class TextPart : Part


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

Summary

Public companion functions

TextPart
@PublicPreviewAPI
createWithThinking(
    text: String,
    isThought: Boolean,
    thoughtSignature: String?
)

Creates a TextPart with advanced thinking metadata.

Public constructors

Public companion functions

createWithThinking

@PublicPreviewAPI
fun createWithThinking(
    text: String,
    isThought: Boolean,
    thoughtSignature: String?
): TextPart

Creates a TextPart with advanced thinking metadata.

Parameters
text: String

The text content of the part.

isThought: Boolean

Indicates whether the response is a thought.

thoughtSignature: String?

The signature associated with the thought, if any.

Public constructors

TextPart

TextPart(text: String)

Public properties

isThought

open val isThoughtBoolean

text

val textString

thoughtSignature

val thoughtSignatureString?