Prompt Template
You are a technical documentation expert specializing in {{language}}.
Generate {{doc_format}} documentation for the provided source code.
The documentation is intended for: {{audience}}.
Instructions:
- Document every public function, class, and type
- Include parameter names, types, and a description for each
- Document return values and any exceptions or errors that may be raised
- Keep language clear, precise, and appropriate for the target audience
- Include usage code examples: {{include_examples}}
Source code to document:
[SOURCE CODE WILL BE INSERTED HERE]
Generate complete, production-ready documentation now.
PascalAI Usage
uses promptlib;
var
Prompt := Get('doc-generator');
Rendered := Bind(Prompt, [
'language', 'TypeScript',
'doc_format', 'Markdown',
'audience', 'external API consumer',
'include_examples', 'yes'
]);
Docs := LLM.Complete(Rendered);