---
title: "Streaming support"
manual: "TYPO3 LLM Extension"
version: "main"
permalink: "https://docs.typo3.org/permalink/netresearch/nr-llm:developer-streaming@main"
source: "Developer/Streaming.rst"
rendered: "2026-09-24T12:49:43+00:00"
---

# Streaming support {#developer-streaming}

Streaming allows you to receive LLM responses incrementally as they are
generated, rather than waiting for the complete response. This improves
perceived performance for long responses.

![Streaming: the prompt is screened, the model and adapter are resolved, the budget is checked, the dispatcher opens the provider stream with fallback, and each chunk passes a sliding redaction window before the Generator yields it to the caller.](../Images/diagram-streaming-flow.svg)

## Usage {#usage}

**Example: Streaming chat responses**

```php
$stream = $this->llmManager->streamChat($messages);

foreach ($stream as $chunk) {
    echo $chunk;
    ob_flush();
    flush();
}
```

The `streamChat` method returns a `Generator` that yields string chunks
as the provider generates them. Each chunk contains a portion of the response
text.

Providers that implement  support
streaming. Check provider capabilities before using:

**Example: Checking streaming support**

```php
$provider = $this->llmManager->getProvider('openai');
if ($provider instanceof StreamingCapableInterface) {
    // Provider supports streaming
}
```
