From 62c619757c4a3a9f3bbbbb46d3533c37826e55ae Mon Sep 17 00:00:00 2001 From: Andrew Huang Date: Thu, 9 Jan 2025 10:30:49 -0800 Subject: [PATCH] missing docs --- panel/chat/step.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/panel/chat/step.py b/panel/chat/step.py index 9c674ab624..a6a999f392 100644 --- a/panel/chat/step.py +++ b/panel/chat/step.py @@ -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 ------- @@ -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(