Add fallback model #312
Replies: 3 comments 1 reply
-
|
like the idea. |
Beta Was this translation helpful? Give feedback.
-
|
What kind of failure are we talking about? Prism::text()->using([
Provider::Anthropic => 'claude-3-sonnet',
Provider::OpenAI => 'gpt-4o'
])
->withSystemPrompt(view('prompts.system'))
->withPrompt('Explain quantum computing to a 5-year-old.')
->asText();I think this will complicate overall code base a lot. It will add lot of juggling with exceptions and abstractions. |
Beta Was this translation helpful? Give feedback.
-
|
The discussion on #300 is relevant here. This would imply all providers map 1:1 onto each other, which currently they do not. I personally am not a fan of making them map 1:1 both from a maintenance and DX perspective (difficult to debug or realise what is actually happening). However, if we did make them all map, I can see this being useful. Or if we went for an dev definable adapter/transformer. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
AI providers are not always stable and can often fail. To avoid the user request actually returning an error, one option would be to use a try and catch pattern and switch providers.
However, this could quickly become cumbersome and repetitive:
Proposal:
Beta Was this translation helpful? Give feedback.
All reactions