-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bagatur/runnable with fallbacks #8543
Conversation
The latest updates on your projects. Learn more about Vercel for Git 鈫楋笌 1 Ignored Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
class RunnableWithFallbacks(Serializable, Runnable[Input, Output]): | ||
runnable: Runnable[Input, Output] | ||
fallbacks: Sequence[Runnable[Input, Output]] | ||
exceptions_to_handle: Tuple[Type[BaseException]] = (Exception,) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make this into a required variable instead of allowing broad exceptions by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't feel super strongly but imagine at least some folks just want some LLM to work and want to fallback on any error
No description provided.