dev-bjoern commited on
Commit
09f0931
·
1 Parent(s): cc0d1d2

Fix: Gradio 6 Chatbot message format

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -112,7 +112,8 @@ with gr.Blocks(title="BPY Chat") as demo:
112
  if not message.strip():
113
  return "", chat_history, None
114
  response, render_path = chat_with_blender(message, chat_history)
115
- chat_history.append((message, response))
 
116
  return "", chat_history, render_path
117
 
118
  btn.click(respond, [msg, chatbot], [msg, chatbot, render_output])
 
112
  if not message.strip():
113
  return "", chat_history, None
114
  response, render_path = chat_with_blender(message, chat_history)
115
+ chat_history.append({"role": "user", "content": message})
116
+ chat_history.append({"role": "assistant", "content": response})
117
  return "", chat_history, render_path
118
 
119
  btn.click(respond, [msg, chatbot], [msg, chatbot, render_output])