Package org.drinkless.tdlib
Class TdApi.ComposeRichMessageWithAi
java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Function<TdApi.RichMessage>
org.drinkless.tdlib.TdApi.ComposeRichMessageWithAi
- Enclosing class:
- TdApi
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.
Returns RichMessage
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanPass true to add emoji to the text.static final intIdentifier uniquely determining type of the object.Custom prompt that will be used instead of styleName; 0-getOption("text_composition_style_prompt_length_max") characters.The original message.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.Pass a language code to which the text will be translated; pass an empty string if translation isn't needed. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for a function, which changes a rich message using an AI model.ComposeRichMessageWithAi(TdApi.InputRichMessage message, String translateToLanguageCode, String styleName, String customPrompt, boolean addEmojis) Creates a function, which changes a rich message using an AI model. -
Method Summary
Modifier and TypeMethodDescriptionintReturns an identifier uniquely determining type of the object.Methods inherited from class org.drinkless.tdlib.TdApi.Function
toString
-
Field Details
-
message
The original message. -
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 or if a custom prompt is used. -
customPrompt
Custom prompt that will be used instead of styleName; 0-getOption("text_composition_style_prompt_length_max") characters. -
addEmojis
public boolean addEmojisPass true to add emoji to the text. -
CONSTRUCTOR
public static final int CONSTRUCTORIdentifier uniquely determining type of the object.- See Also:
-
-
Constructor Details
-
ComposeRichMessageWithAi
public ComposeRichMessageWithAi()Default constructor for a function, which 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.Returns
RichMessage -
ComposeRichMessageWithAi
public ComposeRichMessageWithAi(TdApi.InputRichMessage message, String translateToLanguageCode, String styleName, String customPrompt, boolean addEmojis) Creates a function, which 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.Returns
RichMessage- Parameters:
message- The original message.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 or if a custom prompt is used.customPrompt- Custom prompt that will be used instead of styleName; 0-getOption("text_composition_style_prompt_length_max") characters.addEmojis- Pass true to add emoji to the text.
-
-
Method Details
-
getConstructor
public int getConstructor()Description copied from class:TdApi.ObjectReturns an identifier uniquely determining type of the object.- Specified by:
getConstructorin classTdApi.Object- Returns:
- this.CONSTRUCTOR
-