Skip to content

Commit 3498f60

Browse files
authored
Update Gradio ChatInterface configuration in consuming_tgi.md (#3042)
The current code does not work and gives the following message: UserWarning: You have not specified a value for the `type` parameter. Defaulting to the 'tuples' format for chatbot messages, but this is deprecated and will be removed in a future version of Gradio. Please set type='messages' instead, which uses openai-style dictionaries with 'role' and 'content' keys. warnings.warn( Traceback (most recent call last): File "/Users/angt/hf/tgi/test-gradio.py", line 22, in <module> gr.ChatInterface( TypeError: ChatInterface.__init__() got an unexpected keyword argument 'retry_btn' Signed-off-by: Adrien Gallouët <[email protected]>
1 parent 142a49a commit 3498f60

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

docs/source/basic_tutorials/consuming_tgi.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,10 @@ def inference(message, history):
152152

153153
gr.ChatInterface(
154154
inference,
155-
chatbot=gr.Chatbot(height=300),
156-
textbox=gr.Textbox(placeholder="Chat with me!", container=False, scale=7),
155+
type="messages",
157156
description="This is the demo for Gradio UI consuming TGI endpoint.",
158157
title="Gradio 🤝 TGI",
159158
examples=["Are tomatoes vegetables?"],
160-
retry_btn="Retry",
161-
undo_btn="Undo",
162-
clear_btn="Clear",
163159
).queue().launch()
164160
```
165161

0 commit comments

Comments
 (0)