Implementing a workflow that will iterate on a condition
plan
section of the YAML. A loop iterates through a workflow based on specified conditions and merges outputs at the end of execution. The key components of a loop include:
"Zebra"
.
generate_keyword
workflow generates a word based on an input seed. The generated word is then evaluated in the loop condition.
plan
Sectionworkflow_name: generate_keyword
→ The loop runs this workflow.condition
→ The loop terminates if the word contains “Zebra”.max_iter
: 1 → The loop executes at most once, but it can be adjusted for more iterations.loop_inputs
→ The generated word is fed back into the next iteration.merge_outputs
→ The final output from the loop is stored and passed to the next workflow.format_final_word
workflow formats the final result.