Spectre.Inference.Response (Spectre v0.3.0)

Copy Markdown View Source

Normalized inference response with optional usage and provider metadata.

Summary

Types

t()

@type t() :: %Spectre.Inference.Response{
  latency_ms: non_neg_integer() | nil,
  metadata: map(),
  provider_request_id: term(),
  selection: Spectre.Inference.Selection.t() | nil,
  text: String.t(),
  usage: map()
}

Functions

new(response)

@spec new(t() | String.t() | map() | keyword()) :: t()