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:
Alfiya 2024-04-05 17:54:39 +02:00 committed by GitHub
parent 8250a1a0df
commit f2a1a859ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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