From 33f482babb812468e4f905a789ef090e9de2d34e Mon Sep 17 00:00:00 2001 From: Tadashi Date: Fri, 3 Jan 2025 22:22:55 +0700 Subject: [PATCH] fix: minor fix --- docs/about.md | 2 +- libs/ktem/ktem/pages/chat/__init__.py | 47 +++++++++++++++------------ 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/docs/about.md b/docs/about.md index 579aed54..b001818a 100644 --- a/docs/about.md +++ b/docs/about.md @@ -4,7 +4,7 @@ An open-source tool for chatting with your documents. Built with both end users developers in mind. [Source Code](https://github.com/Cinnamon/kotaemon) | -[Visit our HF Space](https://huggingface.co/spaces/cin-model/kotaemon-demo) +[HF Space](https://huggingface.co/spaces/cin-model/kotaemon-demo) [User Guide](https://cinnamon.github.io/kotaemon/) | [Developer Guide](https://cinnamon.github.io/kotaemon/development/) | diff --git a/libs/ktem/ktem/pages/chat/__init__.py b/libs/ktem/ktem/pages/chat/__init__.py index 4fb15cca..9d1f013d 100644 --- a/libs/ktem/ktem/pages/chat/__init__.py +++ b/libs/ktem/ktem/pages/chat/__init__.py @@ -510,6 +510,10 @@ class ChatPage(BasePage): self.state_chat, ] + self._indices_input, + ).then( + fn=None, + inputs=None, + js=chat_input_focus_js, ) if not KH_DEMO_MODE: @@ -660,27 +664,28 @@ class ChatPage(BasePage): fn=None, inputs=None, outputs=None, js=chat_input_focus_js ) - # evidence display on message selection - self.chat_panel.chatbot.select( - self.message_selected, - inputs=[ - self.state_retrieval_history, - self.state_plot_history, - ], - outputs=[ - self.info_panel, - self.state_plot_panel, - ], - ).then( - fn=self._json_to_plot, - inputs=self.state_plot_panel, - outputs=self.plot_panel, - ).then( - fn=lambda: True, - inputs=None, - outputs=[self._preview_links], - js=pdfview_js, - ) + if not KH_DEMO_MODE: + # evidence display on message selection + self.chat_panel.chatbot.select( + self.message_selected, + inputs=[ + self.state_retrieval_history, + self.state_plot_history, + ], + outputs=[ + self.info_panel, + self.state_plot_panel, + ], + ).then( + fn=self._json_to_plot, + inputs=self.state_plot_panel, + outputs=self.plot_panel, + ).then( + fn=lambda: True, + inputs=None, + outputs=[self._preview_links], + js=pdfview_js, + ) self.chat_control.cb_is_public.change( self.on_set_public_conversation,