# Stream

> **Class** in `langsmith`

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

Provides the core interface to iterate over a synchronous stream response.

## Signature

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

## Extends

- `Generic[_T]`

## Constructors

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

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


## Properties

- `response`

## Methods

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

---

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