fix conditional block branch evaluation for all expression types (#4428)

This commit is contained in:
Celal Zamanoglu
2026-01-10 00:16:38 +03:00
committed by GitHub
parent 6be2ef3fc6
commit 8e1d22ce09
2 changed files with 219 additions and 86 deletions

View File

@@ -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]
}