Prompt File Format
Our file format for serialising prompts to store alongside your source code.
Our .prompt
file format is a serialized version of a model config that is designed to be human-readable and suitable for checking into your version control systems alongside your code.
Format
The .prompt file is heavily inspired by MDX, with model and hyperparameters specified in a YAML header alongside a JSX-inspired format for your Chat Template.
Basic examples
Multi-modality and Images
Images can be specified using nested <image>
tags within a <user>
message. To specify text alongside the image, use a <text>
tag.
Tools, tool calls and tool responses
Specify the tools available to the model as a JSON list in the YAML header.
Tool calls in assistant messages can be added with nested <tool>
tags. A <tool>
tag within an <assistant>
tag denotes a tool call of type: "function"
, and requires the attributes name
and id
. The text wrapped in a <tool>
tag should be a JSON-formatted string containing the tool call’s arguments.
Tool call responses can then be added with <tool>
tags after the <assistant>
message.