how to Streaming on chat interface using Gradio? | Gradio + OpenAI Streaming mode

how to Streaming on chat interface using Gradio? | Gradio + OpenAI Streaming mode

OpenAi 官方的Stream教學 https://platform.openai.com/docs/api-reference/chat/streaming
Gradio 官方的Stream教學 https://www.gradio.app/guides/creating-a-custom-chatbot-with-blocks#add-streaming-to-your-chatbot
兩者結合一下就可以完成Stream, 效果如下

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *