-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
Signed-off-by: ingbyr <[email protected]>
| [source,java] | ||
| ---- | ||
| var converter = new BeanOutputConverter<>(new ParameterizedTypeReference<List<ActorsFilms>>() {}); | ||
| var converter = new BeanOutputConverter<>(new ParameterizedTypeReference<List<ActorFilms>>() {}); |
There was a problem hiding this comment.
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?
spring-ai/models/spring-ai-openai/src/test/java/org/springframework/ai/openai/chat/ActorsFilms.java
Lines 17 to 23 in aa590e8
| package org.springframework.ai.openai.chat; | |
| import java.util.List; | |
| public class ActorsFilms { | |
| private String actor; |
There was a problem hiding this comment.
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); |
| * Non-streaming is only supportive via the Servlet stack. Reactive applications must include the Servlet stack for this reason (e.g. spring-boot-starter-web) and expect some calls to be blocking. | ||
| * Tool calling is imperative, leading to blocking workflows. This also results in partial/interrupted Micrometer observations (e.g. the ChatClient spans and the tool calling spans are not connected, with the first one remaining incomplete for that reason). | ||
| * 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. | ||
| * 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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
This reverts commit 3995d6b. Signed-off-by: ingbyr <[email protected]>
Signed-off-by: ingbyr <[email protected]>
* Fix example code for "Streaming Responses" Fixes #3802 Signed-off-by: ingbyr <[email protected]> (cherry picked from commit 42210d3)
|
@ingbyr Thanks for the PR fixing the documentation. |
* Fix example code for "Streaming Responses" Auto-cherry-pick to 1.0.x Fixes spring-projects#3802 Signed-off-by: ingbyr <[email protected]>
* Fix example code for "Streaming Responses" Auto-cherry-pick to 1.0.x Fixes spring-projects#3802 Signed-off-by: ingbyr <[email protected]>
* Fix example code for "Streaming Responses" Auto-cherry-pick to 1.0.x Fixes spring-projects#3802 Signed-off-by: ingbyr <[email protected]> Signed-off-by: 家娃 <[email protected]>
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:
git commit -s) per the DCOmainbranch and squash your commitsFor more details, please check the contributor guide.
Thank you upfront!