# Class TextPart

java.lang.Object
com.codename1.ai.MessagePart
com.codename1.ai.TextPart

public final class TextPart extends MessagePart
A plain-text fragment of a `ChatMessage`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TextPart(String text)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getText()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TextPart

    public TextPart(String text)

- ## Method Details

  - ### getText

    public String getText()