1. Handlebars Helpers
  2. To YAML String

Handlebars Helpers

To YAML String

Serializes values to YAML strings during Handlebars substitution. Useful for prompts, configuration output, readable structured data, and generated documents.

Uses

You can use this helper to convert an object, value, or array to a YAML string.
This is helpful when you want to pass some data to an LLM task as a YAML. You can use this inline to convert the data to a YAML string directly in prompts.

Usage

Helper name : to_yaml_string

Parameter Description
1 object / value / array to convert to YAML string

Examples

Example use in task:

loading...

Substituted definition

loading...

OUTPUT

`number: 1 string: string boolean: true array:

  • 1
  • 2
  • 3 obj: a: 1`