Spaces:
Running
Running
refactor(ui): remove explicit stream param from chat events
Browse files- [refactor] Remove `stream=True` from `chat_submit.click()` call (ui_components.py:create_chat_tab():70)
- [refactor] Remove `stream=True` from `chat_input.submit()` call (ui_components.py:78)
- ui_components.py +3 -5
ui_components.py
CHANGED
|
@@ -66,21 +66,19 @@ def create_chat_tab(handle_chat_submit_fn):
|
|
| 66 |
# Configuration tips below the chat
|
| 67 |
create_chat_tips()
|
| 68 |
|
| 69 |
-
# Connect chat events
|
| 70 |
chat_submit.click(
|
| 71 |
fn=handle_chat_submit_fn,
|
| 72 |
inputs=[chat_input, chatbot_display, chat_system_message, chat_model_name,
|
| 73 |
chat_max_tokens, chat_temperature, chat_top_p],
|
| 74 |
-
outputs=[chatbot_display, chat_input]
|
| 75 |
-
stream=True
|
| 76 |
)
|
| 77 |
|
| 78 |
chat_input.submit(
|
| 79 |
fn=handle_chat_submit_fn,
|
| 80 |
inputs=[chat_input, chatbot_display, chat_system_message, chat_model_name,
|
| 81 |
chat_max_tokens, chat_temperature, chat_top_p],
|
| 82 |
-
outputs=[chatbot_display, chat_input]
|
| 83 |
-
stream=True
|
| 84 |
)
|
| 85 |
|
| 86 |
|
|
|
|
| 66 |
# Configuration tips below the chat
|
| 67 |
create_chat_tips()
|
| 68 |
|
| 69 |
+
# Connect chat events (streaming auto-detected from generator function)
|
| 70 |
chat_submit.click(
|
| 71 |
fn=handle_chat_submit_fn,
|
| 72 |
inputs=[chat_input, chatbot_display, chat_system_message, chat_model_name,
|
| 73 |
chat_max_tokens, chat_temperature, chat_top_p],
|
| 74 |
+
outputs=[chatbot_display, chat_input]
|
|
|
|
| 75 |
)
|
| 76 |
|
| 77 |
chat_input.submit(
|
| 78 |
fn=handle_chat_submit_fn,
|
| 79 |
inputs=[chat_input, chatbot_display, chat_system_message, chat_model_name,
|
| 80 |
chat_max_tokens, chat_temperature, chat_top_p],
|
| 81 |
+
outputs=[chatbot_display, chat_input]
|
|
|
|
| 82 |
)
|
| 83 |
|
| 84 |
|