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

What are the main differences between the ChatClient and ChatModel components? #2030

Open
xiaohai-78 opened this issue Jan 3, 2025 · 0 comments

Comments

@xiaohai-78
Copy link

Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested.

Expected Behavior

Will there be plans to merge them into a single component in the future?

Current Behavior

example:
openAiChatModel.call(new Prompt(DEFAULT_PROMPT)).getResult().getOutput().getContent();
openAiChatClient.prompt(DEFAULT_PROMPT).call().content();
The final result returned by the two lines of code above is the same.

Context

I have some questions while learning SpringAi, and I would appreciate your insights. What are the main differences between the ChatClient and ChatModel components? Since ChatModel can be converted into ChatClient and they share the same functionality, could it be that they have redundant designs? What is the reasoning behind this design choice? Will there be plans to merge them into a single component in the future? Thank you in advance for your response.

I’ve searched online, but it seems I couldn’t find any related explanations.

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

1 participant