Skip to content

Commit

Permalink
missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 committed Jan 9, 2025
1 parent fd8a4cd commit 62c6197
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion panel/chat/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ def stream(self, token: str | None, replace: bool = False, scroll: bool = True):
The token to stream.
replace : bool
Whether to replace the existing text.
scroll: bool
Whether to scroll to the latest message when streaming.
Returns
-------
Expand All @@ -264,7 +266,8 @@ def stream(self, token: str | None, replace: bool = False, scroll: bool = True):
self.append(message)
else:
stream_to(self.objects[-1], token, replace=replace)
if self._instance is not None:

if self._instance is not None and scroll:
self._instance._chat_log.scroll_to_latest()

def serialize(
Expand Down

0 comments on commit 62c6197

Please sign in to comment.