A common set of context variables and helper functions are available when using templates for
CoTTask.prompt, CoTProcess.optionalPrompts entries, and CoTTask.taskPrompt.
Context
variables:
- task ? the current CoTTask instance (ID, title, description,
etc)
- process ? the owning CoTProcess instance (ID, policies, etc)
- goal ? equivalent to process.goal
- state ? the shared
CoTProcess.state
object for the
workflow - inputs ? inputs to this task if specified as task.inputs; the
same data returned by task.getInputRecord() (may be absent if inputs were not defined)
Helper functions:
- json(x) ? render a compact JSON representation of x
suitable for inclusion in a prompt
- promptPart(nameOrNames, omitNewlines?) /
prt(...) ? insert one or more prompt parts as returned by
CoTProcess.getPromptPart().