Jev (jev_elixir v0.1.0)
Copy MarkdownA small DSL for structured decisions from Jev providers.
Configure a provider and key in runtime config:
config :jev,
provider: :typesafe,
api_key: System.fetch_env!("TYPESAFE_API_KEY")Use provider: :openrouter with an OpenRouter API key to route the same
calls through OpenRouter's Decisions API.
ask/2, choose/3, score/3, and analyze/3 return normalized answers.
They raise Jev.Error when configuration, transport, or response handling
fails. ask?/2 returns a boolean and has the same error behavior.
Summary
Functions
Evaluates several typed questions against one state and returns a keyed map.
Evaluates a yes/no question, returning {:yes | :no, probability}.
Evaluates a yes/no question and returns a boolean at the requested threshold.
Chooses one value from the provided options, returning {choice, probability}.
Scores state on ordered levels, returning {score, confidence}.
Functions
Evaluates several typed questions against one state and returns a keyed map.
Evaluates a yes/no question, returning {:yes | :no, probability}.
Evaluates a yes/no question and returns a boolean at the requested threshold.
Chooses one value from the provided options, returning {choice, probability}.
Scores state on ordered levels, returning {score, confidence}.