diff --git a/.changeset/better-rats-kiss.md b/.changeset/better-rats-kiss.md new file mode 100644 index 0000000000000..b3dcc9ef9c408 --- /dev/null +++ b/.changeset/better-rats-kiss.md @@ -0,0 +1,5 @@ +--- +"website": patch +--- + +fix:Update chatbot.svx for issue#10413 diff --git a/js/_website/src/lib/templates/gradio/03_components/chatbot.svx b/js/_website/src/lib/templates/gradio/03_components/chatbot.svx index 296bfff9c5ffe..3bb9f16b1f707 100644 --- a/js/_website/src/lib/templates/gradio/03_components/chatbot.svx +++ b/js/_website/src/lib/templates/gradio/03_components/chatbot.svx @@ -112,12 +112,12 @@ As an example: import gradio as gr history = [ - {"role": "assistant", content="I am happy to provide you that report and plot."} - {"role": "assistant", content=gr.Plot(value=make_plot_from_file('quaterly_sales.txt'))} + {"role": "assistant", "content": "I am happy to provide you that report and plot."}, + {"role": "assistant", "content": gr.Plot(value=make_plot_from_file('quaterly_sales.txt'))} ] with gr.Blocks() as demo: - gr.Chatbot(history) + gr.Chatbot(history, type="messages") demo.launch() ``` @@ -129,12 +129,12 @@ import gradio as gr history = [ gr.ChatMessage(role="assistant", content="How can I help you?"), - gr.ChatMessage(role="user", content="Can you make me a plot of quarterly sales?"}, - gr.ChatMessage(role="assistant", content="I am happy to provide you that report and plot."} + gr.ChatMessage(role="user", content="Can you make me a plot of quarterly sales?"), + gr.ChatMessage(role="assistant", content="I am happy to provide you that report and plot.") ] with gr.Blocks() as demo: - gr.Chatbot(history) + gr.Chatbot(history, type="messages") demo.launch() ```