Jev.Choice (Jev v0.2.0)

Copy Markdown View Source

Pick one of 2 to 255 labelled options. Jev answers with the label as an atom, plus a confidence and the probability of every option.

Labels are atoms; descriptions are text, a JSON-encodable map, or nil:

%Jev.Choice{
  instructions: "What kind of issue is this?",
  criteria: %{bug: "Something is broken", feature: "Request for new behavior", other: nil}
}

Summary

Types

t()

@type t() :: %Jev.Choice{
  criteria: %{required(atom()) => Jev.entry()},
  instructions: Jev.entry(),
  type: :choice
}