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

Support multiple models like DeepSeek and OpenAI at the same time in one application #2221

Open
sp213 opened this issue Feb 12, 2025 · 3 comments

Comments

@sp213
Copy link

sp213 commented Feb 12, 2025

Expected Behavior

SpringAI could support both DeepSeek and OpenAI configurations at the same time in one application.

Current Behavior

I failed to find a way to support both models at the same time in SpringAI.

Context

For now, the DeepSeek is using the configuration defined by OpenAI, so there is a problem, if I want to integrate DeepSeek, then there's no configuration for OpenAI. Any possibilities that SpringAI can support both models at the same time, in this way, I can dynamically switch the model from OpenAI to DeepSeek per client's request.

@kevintsai1202
Copy link

Agree! Many tools are capable of utilizing multiple models simultaneously to address a process issue. In Spring AI, however, one can only accomplish such tasks through more low-level approaches. It would be highly beneficial for software development if there were a class that could easily interchange multiple sets of configurations.

@sp213
Copy link
Author

sp213 commented Feb 15, 2025

Yes, I really need this feature. I do believe this is a real case for many Spring AI applications as well.

@FakeTrader
Copy link

i think you can follow the doc https://docs.spring.io/spring-ai/reference/api/chatclient.html#_create_a_chatclient_programmatically or create beans for each model

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

No branches or pull requests

3 participants