Versions in this module Expand all Collapse all v0 v0.1.0 Sep 22, 2026 Changes in this version + const DefaultModel + var ErrAPIKeyMissing = errors.New("jev: API key is required; set TYPESAFE_API_KEY or use WithAPIKey") + var ErrInvalidBaseURL = errors.New("jev: invalid base URL") + var ErrNilClientOpts = errors.New("jev: client option must not be nil") + var ErrNilHTTPClient = errors.New("jev: HTTP client must not be nil") + type APIError struct + Body []byte + Header http.Header + StatusCode int + func (e *APIError) Error() string + func (e *APIError) Unwrap() error + type Answer interface + type ChoiceAnswer struct + Choice string + Confidence float64 + Probabilities map[string]float64 + type ChoiceQuestion struct + Criteria map[string]any + Instructions any + func (q ChoiceQuestion) MarshalJSON() ([]byte, error) + type Client struct + func NewClient(opts ...Option) (*Client, error) + func (c *Client) SystemOne(ctx context.Context, req SystemOneRequest) (*SystemOneResponse, error) + type NoulAnswer struct + Noul float64 + type NoulCriteria struct + False any + True any + type NoulQuestion struct + Criteria *NoulCriteria + Instructions any + func (q NoulQuestion) MarshalJSON() ([]byte, error) + type Option func(*clientConfig) + func WithAPIKey(key string) Option + func WithBaseURL(baseURL string) Option + func WithHTTPClient(client *http.Client) Option + type Question interface + type ScoreAnswer struct + Confidence float64 + Legend map[string]string + Probabilities map[string]float64 + Score float64 + type ScoreQuestion struct + Criteria []any + Instructions any + func (q ScoreQuestion) MarshalJSON() ([]byte, error) + type SystemOneRequest struct + Model string + Questions map[string]Question + State any + func (r SystemOneRequest) MarshalJSON() ([]byte, error) + type SystemOneResponse struct + Answers map[string]Answer + Model string + Usage Usage + func (r *SystemOneResponse) UnmarshalJSON(data []byte) error + type Usage struct + InputTokens int64 + OutputTokens int64