# `Spectre.Inference.ProviderEvent`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/inference/provider_event.ex#L1)

Normalized event emitted by a streaming provider adapter.

Delta payloads are binary fragments. They may end inside a UTF-8 codepoint;
the stream session reassembles and validates the bounded trailing bytes
before exposing text to a consumer.

# `t`

```elixir
@type t() :: %Spectre.Inference.ProviderEvent{
  cursor: term(),
  kind: term(),
  metadata: term(),
  payload: term(),
  provider_request_id: term(),
  provider_sequence: term(),
  usage: term(),
  usage_quality: term()
}
```

# `completed`

```elixir
@spec completed(
  Spectre.Inference.Response.t() | String.t() | map(),
  keyword()
) :: t()
```

# `delta`

```elixir
@spec delta(
  binary(),
  keyword()
) :: t()
```

# `new`

```elixir
@spec new(
  atom(),
  keyword()
) :: t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
