Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseStructuredPayload ¶
func ParseStructuredPayload(rendered string, fallbackState map[string]interface{}) (string, string, error)
ParseStructuredPayload parses rendered output that has separate "schema" and "state" envelopes, or treats the full payload as the schema if not wrapped, and normalizes legacy question fields ("name" -> "id", "question"/"prompt" -> "instructions", "items" -> "levels", dict "options" -> list) so that all templates and ad-hoc schemas conform to structured_server.py's parse_schema contract.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine parses and executes Go templates with rich helper functions.
func NewEngine ¶
func NewEngine() *Engine
NewEngine creates a new template engine with default helper functions.
func (*Engine) RenderFile ¶
RenderFile loads a template file from disk and executes it with the given data.
type StructuredPayload ¶
type StructuredPayload struct {
Schema json.RawMessage `json:"schema"`
State json.RawMessage `json:"state"`
}
StructuredPayload represents the rendered JSON package containing a schema and state.