Skip to content

Fix exmaple code for "Streaming Responses" #3802

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

Merged
merged 3 commits into from
Jul 16, 2025

Conversation

ingbyr
Copy link
Contributor

@ingbyr ingbyr commented Jul 13, 2025

Thank you for taking time to contribute this pull request!
You might have already read the contributor guide, but as a reminder, please make sure to:

  • Add a Signed-off-by line to each commit (git commit -s) per the DCO
  • Rebase your changes on the latest main branch and squash your commits
  • Add/Update unit tests as needed
  • Run a build and make sure all tests pass prior to submission

For more details, please check the contributor guide.
Thank you upfront!

@@ -301,7 +301,7 @@ This also demonstrates the use of parameters in the fluent API that will be disc

[source,java]
----
var converter = new BeanOutputConverter<>(new ParameterizedTypeReference<List<ActorsFilms>>() {});
var converter = new BeanOutputConverter<>(new ParameterizedTypeReference<List<ActorFilms>>() {});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the current document is correct. The name of this class is currently ActorsFilms, not ActorFilms. Could you please double-check?

package org.springframework.ai.openai.chat;
import java.util.List;
public class ActorsFilms {
private String actor;

Copy link
Contributor Author

@ingbyr ingbyr Jul 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the class name to be consistent with the test code, and I think the class type should be the same in the following two lines

var converter = new BeanOutputConverter<>(new ParameterizedTypeReference<List<ActorsFilms>>() {});

List<ActorFilms> actorFilms = this.converter.convert(this.content);

* The built-in advisors perform blocking operations for standards calls, and non-blocking operations for streaming calls. The Reactor Scheduler used for the advisor streaming calls can be configured via the Builder on each Advisor class.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No modifications seem to have been made here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I may have accidentally changed the line break. I have changed it back

@ilayaperumalg ilayaperumalg self-assigned this Jul 16, 2025
@ilayaperumalg ilayaperumalg added the documentation Improvements or additions to documentation label Jul 16, 2025
@ilayaperumalg ilayaperumalg added this to the 1.1.x milestone Jul 16, 2025
@ilayaperumalg ilayaperumalg merged commit 42210d3 into spring-projects:main Jul 16, 2025
2 checks passed
spring-builds pushed a commit that referenced this pull request Jul 16, 2025
* Fix example code for "Streaming Responses"

Fixes #3802

Signed-off-by: ingbyr <[email protected]>
(cherry picked from commit 42210d3)
@ilayaperumalg
Copy link
Member

@ingbyr Thanks for the PR fixing the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation for: backport-to-1.0.x status: backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants