Generate: add API warning to streamers (#22659)

add API warning
This commit is contained in:
Joao Gante
2023-04-07 19:15:20 +01:00
committed by GitHub
parent f33419261a
commit 3f96e0b4e4
2 changed files with 18 additions and 0 deletions

View File

@@ -145,6 +145,12 @@ The `generate()` supports streaming, through its `streamer` input. The `streamer
from a class that has the following methods: `put()` and `end()`. Internally, `put()` is used to push new tokens and
`end()` is used to flag the end of text generation.
<Tip warning={true}>
The API for the streamer classes is still under development and may change in the future.
</Tip>
In practice, you can craft your own streaming class for all sorts of purposes! We also have basic streaming classes
ready for you to use. For example, you can use the [`TextStreamer`] class to stream the output of `generate()` into
your screen, one word at a time: