# AsyncStream

> **Class** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/_streaming/AsyncStream)

Provides the core interface to iterate over an asynchronous stream response.

## Signature

```python
AsyncStream(
    self,
    *,
    cast_to: type[_T],
    response: httpx.Response,
    client: AsyncLangsmith,
    options: Optional[FinalRequestOptions] = None,
)
```

## Extends

- `Generic[_T]`

## Constructors

```python
__init__(
    self,
    *,
    cast_to: type[_T],
    response: httpx.Response,
    client: AsyncLangsmith,
    options: Optional[FinalRequestOptions] = None,
) -> None
```

| Name | Type |
|------|------|
| `cast_to` | `type[_T]` |
| `response` | `httpx.Response` |
| `client` | `AsyncLangsmith` |
| `options` | `Optional[FinalRequestOptions]` |


## Properties

- `response`

## Methods

- [`close()`](https://reference.langchain.com/python/langsmith/_streaming/AsyncStream/close)

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-python/blob/15dd2a789f976bbbafd803b26d0f25c08b5ed527/src/langsmith/_streaming.py#L108)