---
title: "respond(to:model:streamingInto:)"
framework: foundationmodels
role: symbol
role_heading: Instance Method
path: "foundationmodels/languagemodelexecutor/respond(to:model:streaminginto:)"
---

# respond(to:model:streamingInto:)

Creates a response stream containing deltas.

## Declaration

```swift
nonisolated(nonsending) func respond(to request: LanguageModelExecutorGenerationRequest, model: Self.Model, streamingInto channel: LanguageModelExecutorGenerationChannel) async throws
```

## Parameters

- `request`: The generation request.
- `model`: The model instance for this request, providing live model state.
- `channel`: A channel used to send events.

## Discussion

Discussion note: If the model declares that it does not have a given capability via capabilities, then the system will automatically throw a LanguageModelSession.GenerationError.unsupportedCapability instead of invoking this method. You do not need to manually validate the request for any functionality captured by LanguageModelCapabilities.
