getSystemPrompt method
Get system prompt for structured output generation
Implementation
String getSystemPrompt(String schema) {
return '''
You are a JSON generator that outputs ONLY valid JSON without any additional text.
CRITICAL RULES:
1. Your entire response must be valid JSON that can be parsed
2. Start with { and end with }
3. No text before the opening {
4. No text after the closing }
5. Follow the provided schema exactly
6. Include all required fields
7. Use proper JSON syntax (quotes, commas, etc.)
Expected JSON Schema:
$schema
Remember: Output ONLY the JSON object, nothing else.
''';
}