Learn how to add content based on conditions in your prompts
if
, else
, and endif
keywords, wrapped in {{ }}
. The content within the block is processed only if the condition evaluates to true
.
||
) to prevent unexpected errors.{{ if user_logged_in && has_permission }}
{{ if x > 0 || y == 1 }}
Next: Learn about Loops and Iteration for even more dynamic capabilities.