Output Modifiers
Default Output
The DefaultOutputOutputs
class allows you to set a default value for an action’s output.
If an action is referenced as a link directly, and it has a default output, the output will be used as the value of the link.
For example:
Referencing the action as a link:
In the above flow, the prompt will be “How good of a greeting is Hello, world!?“.
greet.response
and greet
both map to “Hello, world!“.greet.name_character_count
maps to 5.
Cache Control
The CacheControlOutputs
class allows you to control whether a specific output should be cached.
To disable caching for a specific run of the action, subclass CacheControlOutputs
on the output object: