ArchAstro.Types.AIChatStreamDone (archastro v0.2.0)

Copy Markdown

Terminal event marking the end of a streaming chat completion (SSE done event).

Summary

Types

t()

@type t() :: %ArchAstro.Types.AIChatStreamDone{
  finish_reason: String.t() | ArchAstro.Unset.t(),
  run_count: integer() | ArchAstro.Unset.t(),
  total_usage:
    %{optional(String.t()) => ArchAstro.JSON.t()} | ArchAstro.Unset.t(),
  usage: %{optional(String.t()) => ArchAstro.JSON.t()} | ArchAstro.Unset.t()
}

Functions

from_map(data)

@spec from_map(ArchAstro.JSON.object()) :: t()

matches?(value)

@spec matches?(ArchAstro.JSON.t()) :: boolean()

to_map(value)

@spec to_map(t()) :: ArchAstro.JSON.object()