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

Stream is not work. #131

Open
Lester-Tai opened this issue Nov 23, 2023 · 3 comments
Open

Stream is not work. #131

Lester-Tai opened this issue Nov 23, 2023 · 3 comments

Comments

@Lester-Tai
Copy link

Hello, i enable the stream and it's not work. And i can't find the implementation of callback. Are you conduct it?

@HamaWhiteGG
Copy link
Owner

Supports Stream, but there is no callback.

see StreamOpenAIExample

public class StreamOpenAIExample {

    public static void main(String[] args) {

        var llm = OpenAI.builder()
                .maxTokens(1000)
                .temperature(0)
                .requestTimeout(120)
                .build()
                .init();

        var result = llm.asyncPredict("Introduce West Lake in Hangzhou, China.");
        result.doOnNext(System.out::print).blockLast();
    }
}

@Lester-Tai
Copy link
Author

All right, thx for your response. Will you implement the callback in the future?

@HamaWhiteGG
Copy link
Owner

Yes, I will

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

2 participants