Claudex.Stream.Event.MessageDelta (Claudex v0.6.1)

Copy Markdown View Source

Top-level changes to the message once its content is done: why it stopped and the final token counts.

usage only carries the fields the API chose to send, so merge it into the usage from message_start rather than replacing it — Claudex.Stream.Accumulator does that for you.

Summary

Types

t()

@type t() :: %Claudex.Stream.Event.MessageDelta{
  container: map() | nil,
  stop_details: map() | nil,
  stop_reason: String.t() | nil,
  stop_sequence: String.t() | nil,
  usage: Claudex.Usage.t() | nil
}