Layer 227
method Users
messages.summarizeText#9d4104e2 flags:# peer:InputPeer id:int to_lang:flags.0?string = TextWithEntities;

Parameters

Name Type Description
Peer InputPeer The peer where the message is located.
Id int Message ID.
ToLang flags .0? string If set, generates the summary in the specified target language (two-letter ISO 639-1 language code) instead of the message's language.
Tone flags .2? string If set, rephrases the summary using the specified AI composer tone (pass the tone identifier)

Gogram Example

// MessagesSummarizeText - positional arguments
result, err := client.MessagesSummarizeText(&tg.InputPeerUser{UserID: int64(777000)}, 42, "Hello, World!", "Hello, World!")
if err != nil {
    // handle error
}
// result is *tg.TextWithEntities

Possible Errors

Code Type Description
400 INPUT_TEXT_TOO_LONG The specified text is too long.
400 MSG_ID_INVALID Invalid message ID provided.
400 PEER_ID_INVALID The provided peer id is invalid.