Interface ComposeTextWithAi

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. Request type for Tdjson#composeTextWithAi.

interface ComposeTextWithAi {
    @type: "composeTextWithAi";
    add_emojis?: boolean;
    style_name: string;
    text: FormattedText;
    translate_to_language_code: string;
}

Properties

@type: "composeTextWithAi"
add_emojis?: boolean

Pass true to add emoji to the text.

style_name: string

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.

The original text.

translate_to_language_code: string

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