Browse Source

Added an explicit update so that the log element displays after first llm call

Cam 1 year ago
parent
commit
3003fac7b4
1 changed files with 1 additions and 0 deletions
  1. 1 0
      examples/chat_with_ai/log_callback_handler.py

+ 1 - 0
examples/chat_with_ai/log_callback_handler.py

@@ -13,6 +13,7 @@ class NiceGuiLogElementCallbackHandler(BaseCallbackHandler):
 
     def print_text(self, message: str) -> None:
         self.element.push(message)
+        self.element.update()
 
     def on_chain_start(
         self, serialized: Dict[str, Any], inputs: Dict[str, Any], **kwargs: Any