Browse Source

📝 Add notes of when were features added for SSE JSONL and streaming data

pull/15030/head
Sebastián Ramírez 4 months ago
parent
commit
2269bb446a
  1. 6
      docs/en/docs/advanced/stream-data.md
  2. 6
      docs/en/docs/tutorial/server-sent-events.md
  3. 6
      docs/en/docs/tutorial/stream-json-lines.md

6
docs/en/docs/advanced/stream-data.md

@ -4,6 +4,12 @@ If you want to stream data that can be structured as JSON, you should [Stream JS
But if you want to **stream pure binary data** or strings, here's how you can do it.
/// info
Added in FastAPI 0.134.0.
///
## Use Cases { #use-cases }
You could use this if you want to stream pure strings, for example directly from the output of an **AI LLM** service.

6
docs/en/docs/tutorial/server-sent-events.md

@ -4,6 +4,12 @@ You can stream data to the client using **Server-Sent Events** (SSE).
This is similar to [Stream JSON Lines](stream-json-lines.md){.internal-link target=_blank}, but uses the `text/event-stream` format, which is supported natively by browsers with the <a href="https://developer.mozilla.org/en-US/docs/Web/API/EventSource" class="external-link" target="_blank">`EventSource` API</a>.
/// info
Added in FastAPI 0.135.0.
///
## What are Server-Sent Events? { #what-are-server-sent-events }
SSE is a standard for streaming data from the server to the client over HTTP.

6
docs/en/docs/tutorial/stream-json-lines.md

@ -2,6 +2,12 @@
You could have a sequence of data that you would like to send in a "**stream**", you could do it with **JSON Lines**.
/// info
Added in FastAPI 0.134.0.
///
## What is a Stream? { #what-is-a-stream }
"**Streaming**" data means that your app will start sending data items to the client without waiting for the entire sequence of items to be ready.

Loading…
Cancel
Save