renderMarkdown

View as MarkdownOpen in Claude

Render all sections as a combined Markdown string. Each top-level section becomes a ## heading with its body text, bullet points, and nested subsections rendered below it.

Parameters

None.

Returns

string — The complete rendered Markdown prompt text.

Example

1import { PromptObjectModel } from '@signalwire/sdk';
2
3const pom = new PromptObjectModel();
4pom.addSection('Role', { body: 'You are a helpful assistant.' });
5pom.addSection('Rules', { bullets: ['Be concise', 'Be accurate'] });
6console.log(pom.renderMarkdown());
7// ## Role
8// You are a helpful assistant.
9// ## Rules
10// - Be concise
11// - Be accurate