format_message
Method
This is a method of the BasePlatformAdapter class in the base module.Render text for the platform’s declared
markdown_dialect.
This is the seam that finally consumes the markdown_dialect
capability every adapter advertises: the default keys off
capabilities.markdown_dialect and returns text rendered in that
flavour (e.g. MarkdownV2-escaped for Telegram, Slack mrkdwn for
Slack) so replies render correctly and are never dropped by a transport
that rejects unescaped specials. The default dialect "markdown"
yields a safe plain-text reduction, so existing adapters are unaffected.
Adapters that need the transport parse_mode (e.g. Telegram’s
"MarkdownV2") can call :func:~praisonaiagents.bots.format_for_dialect
directly in their send path; override this method to change formatting.
Signature
Parameters
str
required
No description available.
Returns
str
The result of the operation.
Uses
format_for_dialect
Used By
Source
View on GitHub
praisonaiagents/bots/base.py at line 471
