Versions in this module Expand all Collapse all v0 v0.0.1 Sep 22, 2026 Changes in this version + var ErrNoQuestions = errors.New("jev: at least one question is required") + type APIError = internal.APIError + type Answer interface + Kind func() string + type ChoiceAnswer struct + Choice string + Confidence float64 + Probabilities map[string]float64 + func (ChoiceAnswer) Kind() string + type Client struct + func New(opts ...ClientOption) (*Client, error) + func (c *Client) Evaluate(ctx context.Context, req Request) (*Response, error) + func (c *Client) Map(ctx context.Context, states []Input, questions Questions, opts ...MapOption) []MapResult + func (c *Client) SystemOne(ctx context.Context, state Input, questions Questions, opts ...RequestOption) (*Response, error) + type ClientOption func(*Client) error + func WithAPIKey(key string) ClientOption + func WithBaseURL(baseURL string) ClientOption + func WithHTTPClient(hc *http.Client) ClientOption + func WithMaxAttempts(n int) ClientOption + func WithModel(model string) ClientOption + type Input struct + func State(text string) Input + func Value(v any) Input + type MapOption func(*mapParams) + func WithConcurrency(n int) MapOption + func WithMapModel(model string) MapOption + func WithMaxRetries(n int) MapOption + func WithMinInterval(d time.Duration) MapOption + type MapResult struct + Err error + Response *Response + type NoulAnswer struct + Noul float64 + func (NoulAnswer) Kind() string + type Question struct + Criteria json.RawMessage + Instructions string + Type string + func Choice(instructions string, criteria map[string]string) Question + func Noul(instructions string) Question + func Score(instructions string, criteria []string) Question + type Questions map[string]Question + type Request struct + Model string + Questions Questions + State any + type RequestOption func(*requestParams) + func WithRequestModel(model string) RequestOption + type Response struct + Answers map[string]Answer + Model string + Usage Usage + func (r *Response) Choice(name string) (ChoiceAnswer, bool) + func (r *Response) Noul(name string) (NoulAnswer, bool) + func (r *Response) Score(name string) (ScoreAnswer, bool) + func (r *Response) UnmarshalJSON(data []byte) error + type ScoreAnswer struct + Confidence float64 + Legend map[string]string + Probabilities map[string]float64 + Score float64 + func (ScoreAnswer) Kind() string + type Usage struct + InputTokens int + OutputTokens int