TypeSafe.Response.SystemOne (TypeSafe v0.2.2)

Copy Markdown View Source

The result of a TypeSafe.system_one/4 call.

  • :model — the model that answered the request.
  • :usage — a TypeSafe.Response.Usage with token counts.
  • :answers — every answer keyed by question name.
  • :nouls / :choices / :scores — the answers grouped by type, each keyed by question name.
  • :request_id — the x-typesafe-request-id header, or nil.
  • :raw — the underlying Req.Response.

Summary

Types

t()

@type t() :: %TypeSafe.Response.SystemOne{
  answers: %{optional(String.t()) => TypeSafe.Answer.t()},
  choices: %{optional(String.t()) => TypeSafe.Answer.Choice.t()},
  model: String.t(),
  nouls: %{optional(String.t()) => TypeSafe.Answer.Noul.t()},
  raw: term(),
  request_id: String.t() | nil,
  scores: %{optional(String.t()) => TypeSafe.Answer.Score.t()},
  usage: TypeSafe.Response.Usage.t()
}