# AsyncStream

> **Class** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/_openapi_client/_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/_openapi_client/_streaming/AsyncStream/close)

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/d6cd6082f09e7826a2d6afe444ae6119e61b82a6/python/langsmith/_openapi_client/_streaming.py#L87)