Tune.Adapter.Chat (Tune v0.5.0)

Copy Markdown View Source

DSPy-style Chat format with [[ ## field ## ]] markers.

The system message lists typed fields, shows the marker structure, and states the instructions. Demonstrations are user/assistant message pairs. The reply must contain each output marker exactly once; text before the first marker, the completed marker, and markers for other names are ignored. String fields use the trimmed text verbatim; other fields are decoded as JSON.

Differences from DSPy 3.5: field types are described with JSON type names and JSON Schema instead of Python annotations, non-string values are decoded as strict JSON without repair or Python literal evaluation, and markers are recognized with any spaces or tabs around ## (for example [[ ## label ##]], which local models emit). Values are never altered.

The adapter has no options.