minimaxir / simpleaichat

Python package for easily interfacing with chat apps, with robust features and minimal code complexity.
MIT License
3.48k stars 228 forks source link

Too many line breaks in Jupyter Lab / Notebook #66

Closed zeitderforschung closed 1 year ago

zeitderforschung commented 1 year ago

Printing every object line by line seems to be the default behaviour of the rich console, because the JupyterMixin in rich uses IPython.display which is not suited for the streaming use case.

image

The behaviour can be fixed with force_jupyter=False:

def interactive_console(self, character: str = None, prime: bool = True) -> None:
    console = Console(highlight=False, force_jupyter=False)
image
minimaxir commented 1 year ago

LGTM. Thanks! :)