Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement initial support for fallbacks #207

Merged
merged 1 commit into from
Dec 3, 2024
Merged

Conversation

brainlid
Copy link
Owner

@brainlid brainlid commented Dec 3, 2024

  • adds :with_fallbacks option to LLMChain.run/2 options
  • adds :before_fallback function for chain modification

Fallbacks is a feature inspired by fallbacks in the OG LangChain.

It's an important feature for taking an LLM system into production. When a system like OpenAI goes down or rate limits your usage, this enables you to automatically fallback to a different LLM.

I think it works best going from OpenAI -> Azure OpenAI, or Anthropic -> Bedrock Anthropic. That's where the most similar behavior can be found.

Provides an alternate recovery option for Anthropic "overloaded" errors. Issue #193

- adds :with_fallbacks option to LLMChain.run/2 options
- adds :before_fallback function for chain modification
@brainlid brainlid merged commit 315e787 into main Dec 3, 2024
1 check passed
@brainlid brainlid deleted the me-fallback-requests branch December 3, 2024 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant