# agenerate_from_stream

> **Function** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/language_models/chat_models/agenerate_from_stream)

Async generate from a stream.

## Signature

```python
agenerate_from_stream(
    stream: AsyncIterator[ChatGenerationChunk],
) -> ChatResult
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `stream` | `AsyncIterator[ChatGenerationChunk]` | Yes | AsyncIterator of `ChatGenerationChunk`. |

## Returns

`ChatResult`

Chat result.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/51e954877efd2d2c3c5bf09364dcfec8794eadb0/libs/core/langchain_core/language_models/chat_models.py#L215)