Interface ComposeRichMessageWithAi

Changes a rich message using an AI model. May return an error with a message "AICOMPOSE_FLOOD_PREMIUM" if Telegram Premium is required to send further requests. Request type for Tdjson#composeRichMessageWithAi.

interface ComposeRichMessageWithAi {
    @type: "composeRichMessageWithAi";
    add_emojis?: boolean;
    custom_prompt: string;
    message: InputRichMessage;
    style_name: string;
    translate_to_language_code: string;
}

Properties

@type: "composeRichMessageWithAi"
add_emojis?: boolean

Pass true to add emoji to the text.

custom_prompt: string

Custom prompt that will be used instead of style_name; 0-getOption("text_composition_style_prompt_length_max") characters.

The original message.

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 or if a custom prompt is used.

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.