-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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]>
@@ -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>>() {}); |
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); |
* 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. |
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 DCOmain
branch and squash your commitsFor more details, please check the contributor guide.
Thank you upfront!