-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feat: add text streaming support #24
Feat: add text streaming support #24
Conversation
Thank you for your contributions! I've often considered this feature, but haven't had the free time recently for implementing it. Your efforts have made it a reality. 👍 |
I will merge it after reviewing your commits later. |
I add a However, there is still a tiny problem if I fixed it in this way - the earlier message history on the terminal would be awful with too many duplicated lines. A simple solution to this could be typing Anyway, I will merge this PR tomorrow morning regardless of my updated request as the earlier feature you added was truly useful enough and you can revert my commit if you think the fix here is not appropriate (maybe you once tried this method but discarded it finally). You can drop my commits and force-push to update the remote. Again, thanks for your contributions! |
Nice, I think that is better than just displaying three the dots when the vertical space runs out, even with the messed up scroll history.
I could not immediately figure out a good way to make this work nicely. One option would have been using Live(screen=True) while the text is being streamed, and when complete, the alternative screen would disappear with all intermediate content, making it possible to do a clean print of the whole message leaving the scroll back history nice and clean. Sadly this did not seem to work well in practice because the Live view in screen=True mode is stuck following the top of the screen only. I'll create another pull request later if I manage to figure out how to deal with this.
Thank you for the cli app! I like it a lot more than using the WebUI 😄 |
91b9a7b
to
0554922
Compare
I fixed it by adding a |
This change allows you to stream text from the API to the console word-by-word similar to what the official WebUI does.