Learn how to define, interpret, and interpolate variables in PromptL
{{ }}
) and can be used directly in text or as part of logic expressions.
{{ }}
:
name
is assigned the value "Alice"
.name
variable can be defined in the code when running this prompt, allowing you to dynamically customize the output without modifying the prompt.
||
operator. If the variable is not defined in the prompt or provided as an input parameter, the default value will be used.
name
variable will default to "Alice"
if no value is provided.
user.name
, weather.currentTemp
x
, temp