Dsxir.Prediction (dsxir v0.1.0)

Copy Markdown

Typed output of a predictor call.

fields is the validated, Zoi-passed output map keyed by output field name. Access protocol forwards directly to fields, so pred[:answer] and pred.fields.answer are equivalent.

Summary

Types

t()

@type t() :: %Dsxir.Prediction{
  completions: [String.t()],
  fields: map(),
  lm_usage: nil | map()
}

Functions

new(fields, opts \\ [])

@spec new(
  map(),
  keyword()
) :: t()