wolf-core
wolf-core copied to clipboard
`shouldRetry` property for slots
Is your feature request related to a problem? Please describe. Dev should be able to define a function that based on turn count or existing wolf state, whether wolf needs to run the retry function if a response is invalid.
This is helpful if Dev wants the only retry 3 times, and go to another slot.
Describe the solution you'd like
Describe alternatives you've considered
We could the logic in the retryQuery
function but it feels dirty.
Additional context
If a user says a invalid slot and after the validate
function, the shouldRetry
function should run and determine if it should retry again or simply cancel.
The example we used during discussion is a "number guessing" game where the max number of "retries" is 5.