concurrency_default: false
user_input:
word:
type: ShortText
workflows:
generate_keyword:
- name: generate_keyword_prompt
type: jinja
config:
log_output: true
output_template:
jinja_template_str: "We are playing a game where you need to pick a word based on a seed. It is your turn to guess a word for the seed {{word}}. Please output your choice of word and nothing else: "
inputs:
word: word
- name: generate_keyword
type: generation
config:
llm_model: gpt-4o
max_tokens: 10
temperature: 1.0
inputs:
input_prompt: generate_keyword_prompt.output
format_final_word:
- name: format_final_word_node
type: jinja
config:
output_template:
jinja_template_str: "The final word is {{final_word}}"
inputs:
final_word: final_word
plan:
- name: simple_loop
workflow:
workflow_name: generate_keyword
condition:
logical_operator: NOT
conditions:
- condition_input_var: word
operator: contains
reference_var: Zebra
max_iter: 1
loop_inputs:
word:
node_name: generate_keyword
default_source: word
merge_outputs:
final_word: generate_keyword
- workflow_name: format_final_word
workflow_inputs:
final_word: simple_loop.final_word.output