mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-21 01:01:05 +08:00
Clarify the streaming response documentation (#7924)
* Clarify the streaming response documentation You cannot simply yield one new token at a time, you have to yield the new full response. * Clarify streaming chatbot instructions * Clarify streaming chatbots
This commit is contained in:
parent
8250a1a0df
commit
f2a1a859ae
@ -73,7 +73,7 @@ gr.ChatInterface(alternatingly_agree).launch()
|
||||
|
||||
## Streaming chatbots
|
||||
|
||||
If in your chat function, you use `yield` to generate a sequence of responses, you'll end up with a streaming chatbot. It's that simple!
|
||||
In your chat function, you can use `yield` to generate a sequence of partial responses, each replacing the previous ones. This way, you'll end up with a streaming chatbot. It's that simple!
|
||||
|
||||
```python
|
||||
import time
|
||||
|
Loading…
Reference in New Issue
Block a user