TextPart interface

Content part interface if the part represents a text string.

Signature:

exportinterfaceTextPart

Properties

PropertyTypeDescription
codeExecutionResultnever
executableCodenever
functionCallnever
functionResponsenever
inlineDatanever
textstring
thoughtboolean

TextPart.codeExecutionResult

Signature:

codeExecutionResult?:never;

TextPart.executableCode

Signature:

executableCode?:never;

TextPart.functionCall

Signature:

functionCall?:never;

TextPart.functionResponse

Signature:

functionResponse?:never;

TextPart.inlineData

Signature:

inlineData?:never;

TextPart.text

Signature:

text:string;

TextPart.thought

Signature:

thought?:boolean;

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-09-18 UTC.