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

[feature request] don't stream response #91

Closed
zegerius opened this issue Mar 22, 2023 · 2 comments · Fixed by #759
Closed

[feature request] don't stream response #91

zegerius opened this issue Mar 22, 2023 · 2 comments · Fixed by #759

Comments

@zegerius
Copy link

The current implementation of --no-stream makes sense to some degree, i.e. the OpenAI response is not streamed. However, it doesn't make sense to render the 'ticker' that way - we have the full response in memory anyway.

It would also make sense to be able to toggle this dynamically:

.set stream true
.set stream false

The current --no-stream can be maintained and just set the config value (config.stream) to false.

I took a look at render/mod.rs:render_stream and render/repl.rs:repl_render_stream but don't have enough Rust experience to idiomatically solve this. My hunch is that there are two types of receivers ReplyStreamEvent and ReplyEvent. The writer is then either streamed or instant.

@sigoden
Copy link
Owner

sigoden commented Mar 22, 2023

The --no-stream only works in command mode.

In chat mode, the response always streamed.

GPT replys much faster in stream. I don't think anyone wants to use no-stream response in chat mode.

The OpenAI response can be stream or non-stream, They are different.

@sigoden sigoden closed this as completed Mar 22, 2023
@kwekewk
Copy link

kwekewk commented Jul 6, 2024

Bumping this. Now, there quite a lot different openai api compatible providers and some of which don't offer/support stream response

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

Successfully merging a pull request may close this issue.

3 participants