Raullen commited on
Commit
b8d59a5
·
verified ·
1 Parent(s): 363deb6

fix: drop ChatInterface(type=...) — gone in Gradio 6.x

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -201,9 +201,11 @@ with gr.Blocks(title="QuickSilver Pro Chat") as demo:
201
  # Gradio 6.0 removed the submit_btn / retry_btn / undo_btn / clear_btn
202
  # args in favor of a more opinionated default layout; dropping them
203
  # keeps this compatible with both 5.x and 6.x.
 
 
 
204
  gr.ChatInterface(
205
  fn=respond,
206
- type="messages",
207
  additional_inputs=[model_dropdown, system_prompt, temperature, max_tokens],
208
  examples=[
209
  ["Write a concise git commit message for: fixed off-by-one error in pagination"],
 
201
  # Gradio 6.0 removed the submit_btn / retry_btn / undo_btn / clear_btn
202
  # args in favor of a more opinionated default layout; dropping them
203
  # keeps this compatible with both 5.x and 6.x.
204
+ # Gradio 6.x: ChatInterface dropped the `type=` kwarg; messages
205
+ # format is now the default and tuples are gone. `respond()` is
206
+ # already written against the dict-history shape.
207
  gr.ChatInterface(
208
  fn=respond,
 
209
  additional_inputs=[model_dropdown, system_prompt, temperature, max_tokens],
210
  examples=[
211
  ["Write a concise git commit message for: fixed off-by-one error in pagination"],