public final class TextPart

  1. Object
  2. MessagePart
  3. TextPart
A plain-text fragment of a ChatMessage. Text content within a multimodal ChatMessage.

Constructors

public TextPart(String text)Creates a text part.

Methods

public String getText()

Inherited methods

Constructor details

TextPart

public TextPart(String text)
Creates a text part.

Parameters

text String
text sent to or received from the model

Method details

getText

public String getText()

Returns

text carried by this part