Skip to main content
Send styled text written in standard markdown — a static string or a streaming LLM response.
  • markdown("**hi**") sends the markdown as one message.
  • markdown(source) marks a text stream as markdown: platforms with native support stream it styled (Telegram renders drafts and the final message via parse_mode), and everywhere else the accumulated text falls back through the markdown chain instead of surfacing raw ** markers.
Stream sources and options work exactly as in text() — any SDK streaming result or AsyncIterable / ReadableStream, with options.extract for unrecognized chunk shapes.

Parameters

string
required

Returns

ContentBuilder
Send styled text written in standard markdown — a static string or a streaming LLM response.
  • markdown("**hi**") sends the markdown as one message.
  • markdown(source) marks a text stream as markdown: platforms with native support stream it styled (Telegram renders drafts and the final message via parse_mode), and everywhere else the accumulated text falls back through the markdown chain instead of surfacing raw ** markers.
Stream sources and options work exactly as in text() — any SDK streaming result or AsyncIterable / ReadableStream, with options.extract for unrecognized chunk shapes.

Parameters

StreamTextSource<T>
required
TextStreamOptions<T>

Returns

ContentBuilder