Fix info panel overflow (#33)

* update chatbot placeholder

* fix chat info panel overflow bug

* set azure_endpoint to required in AzureChatOpenAI

* update screenshots
This commit is contained in:
ian_Cin 2024-04-14 09:34:14 +07:00 committed by GitHub
parent 8985963e1e
commit 5286ff48bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 9 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 KiB

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 85 KiB

View File

@ -299,7 +299,8 @@ class AzureChatOpenAI(BaseChatOpenAI):
"HTTPS endpoint for the Azure OpenAI model. The azure_endpoint, " "HTTPS endpoint for the Azure OpenAI model. The azure_endpoint, "
"azure_deployment, and api_version parameters are used to construct " "azure_deployment, and api_version parameters are used to construct "
"the full URL for the Azure OpenAI model." "the full URL for the Azure OpenAI model."
) ),
require=True,
) )
azure_deployment: str = Param(help="Azure deployment name", required=True) azure_deployment: str = Param(help="Azure deployment name", required=True)
api_version: str = Param(help="Azure model version", required=True) api_version: str = Param(help="Azure model version", required=True)

View File

@ -87,7 +87,7 @@ button.selected {
#chat-info-panel { #chat-info-panel {
max-height: var(--main-area-height) !important; max-height: var(--main-area-height) !important;
overflow-y: scroll !important; overflow: auto !important;
} }
#conv-settings-panel { #conv-settings-panel {

View File

@ -63,9 +63,9 @@ class ChatPage(BasePage):
with gr.Column(scale=6, elem_id="chat-area"): with gr.Column(scale=6, elem_id="chat-area"):
self.chat_panel = ChatPanel(self._app) self.chat_panel = ChatPanel(self._app)
with gr.Column(scale=3): with gr.Column(scale=3, elem_id="chat-info-panel"):
with gr.Accordion(label="Information panel", open=True): with gr.Accordion(label="Information panel", open=True):
self.info_panel = gr.HTML(elem_id="chat-info-panel") self.info_panel = gr.HTML()
def on_register_events(self): def on_register_events(self):
gr.on( gr.on(

View File

@ -10,7 +10,10 @@ class ChatPanel(BasePage):
def on_building_ui(self): def on_building_ui(self):
self.chatbot = gr.Chatbot( self.chatbot = gr.Chatbot(
label="Kotaemon", label="Kotaemon",
placeholder="This is the beginning of a new conversation.", placeholder=(
"This is the beginning of a new conversation.\nMake sure to have added"
" a LLM by following the instructions in the Help tab."
),
show_label=False, show_label=False,
elem_id="main-chat-bot", elem_id="main-chat-bot",
show_copy_button=True, show_copy_button=True,