Package-level declarations
Types
A closed category domain paired with caller-owned values. Structural collections are copied; value references are retained and may themselves be mutable. Values, including Class tokens, never enter provider requests and are never instantiated or populated from model output. Categories follow the supplied map's iteration order; pass an ordered map for stable provider order.
Text to classify with a ClassificationSpec. A classification request is a decision request whose spec has one choice question, so it goes anywhere a DecisionRequest goes. Its JSON is the decision request JSON. The input may be empty.
A provider assessment. No match, insufficient evidence, and operational failure are distinct.
Provider-neutral closed-category classification; implementations own execution and provider integration.
Pure metadata for a classification model, independent of its provider client.
A classification: one choice question that picks a category for some text. It is a decision spec with exactly one question, so a decision service can answer it and a decision response holds its result under question.
Operational failure categories. Raw provider messages and throwables are deliberately excluded. JSON writes each one as its lower-case name, such as invalid_response.
A classification mapped to a caller-owned value. Non-selection variants are the original ClassificationResult.NoMatch, ClassificationResult.Inconclusive, and ClassificationResult.Failure.
Provider-reported identity of the model that produced an assessment. Optional version and request ID remain absent when unknown. This evidence does not assert calibration or resolve a model. Providers must supply identifiers suitable for the caller to retain, never credentials or payloads.
Functions
Builds a classification spec with a Kotlin receiver block.