Terminal output color and streaming! #850
dimondjik
started this conversation in
Show and tell
Replies: 2 comments 1 reply
-
Thanks for sharing, this is super cool! I think if we can accurately detect when users are on a terminal (vs ipython), this would be a great utility to include in the package. Let me think on if we can detect this reasonably well...thanks for sharing again! |
Beta Was this translation helpful? Give feedback.
1 reply
-
@dimondjik I hope you don't mind that I incorporated this code into a PR -- please let me know if you have any feedback or suggestions :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here's a code snippet you guys may find helpful.
(guidance >= 0.1 since it's the version where streaming was introduced, python 3.10.6)
It outputs colored stream into terminal (I personally use it in PyCharm), green is the text generated by llm:
Beta Was this translation helpful? Give feedback.
All reactions