Spaces:
Sleeping
Sleeping
Julian Vanecek Claude commited on
Commit ·
48d3dbc
1
Parent(s): 7d60461
Fix Chatbot initialization and message handling
Browse files- Initialize Chatbot with empty list value=[]
- Remove orphaned comment about adding user message to history
- Ensures proper list format from the start
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
py/frontend/gradio_app.py
CHANGED
|
@@ -169,9 +169,6 @@ class PeerToPeerApp:
|
|
| 169 |
version != self.current_version):
|
| 170 |
self.update_settings(model, product, version)
|
| 171 |
|
| 172 |
-
# Add user message to history
|
| 173 |
-
# Gradio expects list of [user, assistant] pairs, not dicts
|
| 174 |
-
|
| 175 |
# Save user message to database
|
| 176 |
self.history_manager.add_message(
|
| 177 |
self.current_conversation_id,
|
|
@@ -553,6 +550,7 @@ class PeerToPeerApp:
|
|
| 553 |
with gr.Column(scale=3):
|
| 554 |
# Chat interface
|
| 555 |
chatbot = gr.Chatbot(
|
|
|
|
| 556 |
height=500,
|
| 557 |
show_label=False,
|
| 558 |
elem_id="chatbot",
|
|
|
|
| 169 |
version != self.current_version):
|
| 170 |
self.update_settings(model, product, version)
|
| 171 |
|
|
|
|
|
|
|
|
|
|
| 172 |
# Save user message to database
|
| 173 |
self.history_manager.add_message(
|
| 174 |
self.current_conversation_id,
|
|
|
|
| 550 |
with gr.Column(scale=3):
|
| 551 |
# Chat interface
|
| 552 |
chatbot = gr.Chatbot(
|
| 553 |
+
value=[],
|
| 554 |
height=500,
|
| 555 |
show_label=False,
|
| 556 |
elem_id="chatbot",
|