Package org.drinkless.tdlib

# Class TdApi.ComposeTextWithAi

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Function<TdApi.FormattedText>
org.drinkless.tdlib.TdApi.ComposeTextWithAi

Enclosing class:
  `TdApi`

public static class TdApi.ComposeTextWithAi extends TdApi.Function<TdApi.FormattedText>
Changes text using an AI model; must not be used in secret chats. May return an error with a message "AICOMPOSE_FLOOD_PREMIUM" if Telegram Premium is required to send further requests.

Returns `FormattedText`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.drinkless.tdlib.TdApi.Function

  `TdApi.Function.Constructors`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `boolean`
  `addEmojis`
  Pass true to add emoji to the text.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `String`
  `styleName`
  Name of the style of the resulted text; handle updateTextCompositionStyles to get the list of supported styles; pass an empty string to keep the current style of the text.
  `TdApi.FormattedText`
  `text`
  The original text.
  `String`
  `translateToLanguageCode`
  Pass a language code to which the text will be translated; pass an empty string if translation isn't needed.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ComposeTextWithAi()`
  Default constructor for a function, which changes text using an AI model; must not be used in secret chats.
  `ComposeTextWithAi(TdApi.FormattedText text, String translateToLanguageCode, String styleName, boolean addEmojis)`
  Creates a function, which changes text using an AI model; must not be used in secret chats.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Function

  `toString`

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

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

- ## Field Details

  - ### text

    public TdApi.FormattedText text
    The original text.

  - ### translateToLanguageCode

    public String translateToLanguageCode
    Pass a language code to which the text will be translated; pass an empty string if translation isn't needed. See translateText.toLanguageCode for the list of supported values.

  - ### styleName

    public String styleName
    Name of the style of the resulted text; handle updateTextCompositionStyles to get the list of supported styles; pass an empty string to keep the current style of the text.

  - ### addEmojis

    public boolean addEmojis
    Pass true to add emoji to the text.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ComposeTextWithAi

    public ComposeTextWithAi()
    Default constructor for a function, which changes text using an AI model; must not be used in secret chats. May return an error with a message "AICOMPOSE_FLOOD_PREMIUM" if Telegram Premium is required to send further requests.

    Returns `FormattedText`

  - ### ComposeTextWithAi

    public ComposeTextWithAi(TdApi.FormattedText text, String translateToLanguageCode, String styleName, boolean addEmojis)
    Creates a function, which changes text using an AI model; must not be used in secret chats. May return an error with a message "AICOMPOSE_FLOOD_PREMIUM" if Telegram Premium is required to send further requests.

    Returns `FormattedText`

    Parameters:
      `text` - The original text.
      `translateToLanguageCode` - Pass a language code to which the text will be translated; pass an empty string if translation isn't needed. See translateText.toLanguageCode for the list of supported values.
      `styleName` - Name of the style of the resulted text; handle updateTextCompositionStyles to get the list of supported styles; pass an empty string to keep the current style of the text.
      `addEmojis` - Pass true to add emoji to the text.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.Function<TdApi.FormattedText>`
    Returns:
      this.CONSTRUCTOR