You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's sometime necessary to have access to the context of previous retry attempts when running a new retry attempt. For example, when receiving a parse error from an llm response it is useful to be able to send the parse error message to the llm. Or in other cases it is useful to keep track of how many times a retry has taken place.
What is the feature you are proposing to solve the problem?
A fn like
Effect.withRetry({run: (previousFailures: Cause[],runCount: number)=>Effect.fail(""),// ... normal retry params: while, etc. })
What alternatives have you considered?
runCount could just be extracted from previousResults.length
The text was updated successfully, but these errors were encountered:
I briefly tried accumulating errors from previous runs instead of just the count, but getting TypeScript to infer the error type was more involved.
I call it retryWith here because it isn't very pipeline-friendly, and when I compare existing APIs like withRandom vs randomWith, it appears the .with* functions more often wrap existing effects and are more pipeline-friendly, while .*With functions often produce a standalone effect from a factory function.
What is the problem this feature would solve?
It's sometime necessary to have access to the context of previous retry attempts when running a new retry attempt. For example, when receiving a parse error from an llm response it is useful to be able to send the parse error message to the llm. Or in other cases it is useful to keep track of how many times a retry has taken place.
What is the feature you are proposing to solve the problem?
A fn like
What alternatives have you considered?
runCount could just be extracted from previousResults.length
The text was updated successfully, but these errors were encountered: