The system prompt snippet of the direct JSON format.
The snippet has three parts, separated by blank lines:
## Workflow Description:andworkflow_rules/0;- the schemas, between
---BEGIN A2UI JSON SCHEMA---and---END A2UI JSON SCHEMA---lines (schema_prompt/2); ### Examples:and each example turn as an<a2ui-json>block, when there are examples.
Summary
Functions
Each example turn as an <a2ui-json> block, separated by blank lines;
"" without examples. A message given as a Jason.OrderedObject
keeps its key order.
Assembles the prompt snippet. Options: :examples (a list of turns,
each a list of messages) and :allowed_messages (see
schema_prompt/2).
The schemas that describe the catalogs to the model: the
agent-to-renderer schema of the catalogs' protocol version (pruned to
allowed_messages unless that is nil), the common types those
schemas use, then one section per catalog document
(A2UICore.Catalog.to_json/2), each as compact JSON. The protocol
schemas keep the key order they are published in, and the catalog
documents the order of the documents they were read from.
The workflow rules every direct JSON prompt starts with.
Functions
Each example turn as an <a2ui-json> block, separated by blank lines;
"" without examples. A message given as a Jason.OrderedObject
keeps its key order.
@spec generate([A2UICore.Catalog.t()], keyword()) :: {:ok, String.t()} | {:error, A2UICore.Error.t()}
Assembles the prompt snippet. Options: :examples (a list of turns,
each a list of messages) and :allowed_messages (see
schema_prompt/2).
@spec schema_prompt([A2UICore.Catalog.t()], [String.t()] | nil) :: {:ok, String.t()} | {:error, A2UICore.Error.t()}
The schemas that describe the catalogs to the model: the
agent-to-renderer schema of the catalogs' protocol version (pruned to
allowed_messages unless that is nil), the common types those
schemas use, then one section per catalog document
(A2UICore.Catalog.to_json/2), each as compact JSON. The protocol
schemas keep the key order they are published in, and the catalog
documents the order of the documents they were read from.
The catalogs must be non-empty and share a protocol version.
@spec workflow_rules() :: String.t()
The workflow rules every direct JSON prompt starts with.