Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Value

Number

  • A simple integer or floating point number
  • Non-functional input allows it to be part of control flow
  • e.g. can be placed between Fallback and Select

Plain Text

  • Simple text input
  • Non-functional input allows it to be part of control flow
  • No structure of formatting

Template

  • Uses minijinja templates to convert a context into plain text
  • variables input is a JSON object
    • Typically supplied by Structured Output or Invoke Tools with Parse JSON
    • Can also be constructed by using Transform JSON paired with Gather JSON
    • Scalar inputs will be wrapped with the key “value”
    • You can access the entire input as CONTEXT inside a template
      Hello, your input was:
      {{ CONTEXT | tojson(indent=2) }}
      
      Have a nice run.
      
  • Use cases
    • Formatting human readable reports from structured data or tool results
    • Transforming data into formats that a language model can digest more easily
    • Combine data from multiple paths in the graph