getPrompt

View as MarkdownOpen in Claude

Return the fully rendered prompt text. If raw text was set via setPromptText(), it is returned directly. Otherwise, POM sections are rendered to Markdown. Returns an empty string if nothing is configured.

Parameters

None.

Returns

string — The prompt string, or empty string if nothing is set.

Example

1import { PromptManager } from '@signalwire/sdk';
2
3const pm = new PromptManager();
4pm.addSection('Role', { body: 'You are a helpful assistant.' });
5
6const prompt = pm.getPrompt();
7console.log(prompt);
8// ## Role
9// You are a helpful assistant.