use different LLMs #458
-
I'm writing App which provides the ability that different user can use different LLM (different provider, different model, etc.). User can change LLM model from a configuration file. Please advise how can I handle the different LLMs with same code. Any pattern I can use in Rig? |
Beta Was this translation helpful? Give feedback.
Answered by
joshua-mo-143
May 25, 2025
Replies: 1 comment
-
Hi, the current state of LLM clients means you will likely need to write an enum wrapper: enum Provider {
OpenAI(rig::provider::openai::Client),
// .. the rest of your providers here
} We're taking a stab at dealing with this exact issue in #440 but for now, this is probably the closest thing you're going to get to a solution. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ifeue
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, the current state of LLM clients means you will likely need to write an enum wrapper:
We're taking a stab at dealing with this exact issue in #440 but for now, this is probably the closest thing you're going to get to a solution.