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

Double remote call on DefaultChatClient with content and chatResponse #2097

Open
Grogdunn opened this issue Jan 22, 2025 · 0 comments
Open

Comments

@Grogdunn
Copy link
Contributor

Bug description
In DefaultChatClient#DefaultCallResponseSpec (also in streaming) call chatResponse or conent trigger the remote call twice.

Environment
Spring AI version M5 confirmed also on main

Steps to reproduce
simply call chatResponse and content and double remote service is invoked

Expected behavior
per "DefaultCallResponseSpec" access to same response (memoized)

Minimal Complete Reproducible example

var response = chatClient.prompt()
		.advisors(new ReReadingAdvisor())
		.call();
response.content();
response.chatResponse();
Grogdunn added a commit to optionfactory/spring-ai that referenced this issue Jan 22, 2025
Grogdunn added a commit to optionfactory/spring-ai that referenced this issue Jan 22, 2025
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