Learn how to work with different output modes in Polyglot.
Mode
enum:
Mode | Description | Best For |
---|---|---|
OutputMode::Text | Default mode, returns unstructured text | Simple text generation |
OutputMode::Json | Returns structured JSON data | Structured data processing |
OutputMode::JsonSchema | Returns JSON data validated against a schema | Strictly typed data |
OutputMode::MdJson | Returns JSON wrapped in Markdown code blocks | Compatibility across providers |
OutputMode::Tools | Returns function/tool calls | Function calling/external actions |