Loop #19
-
If I select a file with 10 diff words, like red, white ..., orange, and I use it in the prompt and if I run it for 10 batches, would it select all 10 unique values, one after one, or it may select a couple repeatedly? Is there a way to make it run sequentially like a while or for loop and iterate through all values one by one? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @aniketgore, Good question! This may have been possible with a complex template, but I just released a new update (v0.8.0) that offers a fairly straightforward solution. Check it out:
The Note: it will automatically clamp the given Let me know if you have any other questions. 🙂 |
Beta Was this translation helpful? Give feedback.
Hi @aniketgore,
Good question!
This may have been possible with a complex template, but I just released a new update (v0.8.0) that offers a fairly straightforward solution.
Check it out:
The
_case
argument overrides the random nature of[choose]
withbatch_index
- a new, built-in variable that corresponds to your progress in a batch run.Note: it will automatically clamp the given
_case
value between 0 and the zero-indexed length of your[choose]
list (i.e. between 0 and 2 in the example above), so if you need to loop through the list multiple times, you will have to perform additional processing …