fix conditional block branch evaluation for all expression types (#4428)
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
You are evaluating conditional branches for a workflow. Return the results to tell me whether each natural language criterion is satisfied.
|
||||
|
||||
Criteria (order matters; align outputs to these indices):
|
||||
{% for criterion in branch_criteria -%}
|
||||
- {{ criterion.index }}: {{ criterion.expression }}
|
||||
Evaluate if the following condition(s) are TRUE or FALSE.
|
||||
{% if conditions|length == 1 %}
|
||||
Condition: {{ conditions[0] }}
|
||||
{% else %}
|
||||
{% for condition in conditions %}
|
||||
Condition {{ loop.index }}: {{ condition }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if context_json %}
|
||||
|
||||
Context (use this data to evaluate each criterion; if a value is absent, treat it as missing/Falsey):
|
||||
{{ context_snapshot }}
|
||||
Use this context to understand variable values:
|
||||
{{ context_json }}
|
||||
{% endif %}
|
||||
|
||||
Respond with JSON exactly in this shape:
|
||||
{
|
||||
"branch_results": [true | false per criterion, in order]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user