Skip to content

createRichMessageWithAi

Function · TDLib 1.8.67 · d1085f9c

Creates a new 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

createRichMessageWithAi(
  prompt: string,
  language_code: string,
  add_emojis: Bool
) → RichMessage

prompt

string

Prompt that will be used to create the message; 0-getOption("text_composition_style_prompt_length_max") characters

language_code

string

Pass a language code in which the text will be created

add_emojis

Bool

Pass true to add emoji to the text