Expand description
Client for TypeSafe’s System One decision API (model family “Jev”).
A System One request sends one state (text, JSON, or images) plus named,
typed questions; every question is evaluated in parallel and answered with a
typed, calibrated result:
| Question | Answer |
|---|---|
Question::Choice | selected option, a probability per option, confidence |
Question::Score | expected score over ordered levels, probabilities, confidence |
Question::Noul | probability that the yes/no statement is true |
Question::Box | box edges (fractions of the image) and optional confidence |
Requests go to POST {base_url}/v1/systemone with Authorization: Bearer <key>.
The key is static (SystemOneConfig::api_key) or fetched per request from a
CredentialSource; a 401/403 invalidates the credential and retries once.
The client validates the documented request rules before sending (at least one
question, 1–255 choice options, 1–10 score levels, nesting depth, referenced
assets, body size) and sets the TypeSafe-Danger-Zone-Images header whenever
a request carries images or a box question.
Structs§
- BoxCoordinates
- Box edges as fractions of the image (top/bottom from the top, left/right from the left).
- Image
Asset - An image asset, referenced by its key wherever it appears in a request string.
- Noul
Criteria - Criteria of a yes/no question: what counts as yes and as no.
- System
OneClient - System One API client. Register it in
graphrt_core::ServicesasArc<SystemOneClient>. - System
OneConfig - Client configuration.
- System
OneRequest - A System One request.
- System
OneResponse - A System One response.
- System
OneUsage - Token usage of a request.
Enums§
Constants§
- DEFAULT_
BASE_ URL - Default API endpoint.
- DEFAULT_
MODEL - Default model alias: the newest stable Jev release.
- MAX_
BODY_ BYTES - Documented maximum request body (32 MiB).
- MAX_
CHOICE_ OPTIONS - Documented maximum options of a choice question.
- MAX_
NESTING - Documented maximum nesting of
state,instructionsandcriteria. - MAX_
REFERENCES_ BYTES - Documented maximum total length of all asset references, in bytes.
- MAX_
REFERENCE_ BYTES - Documented maximum length of one asset reference, in bytes.
- MAX_
SCORE_ LEVELS - Documented maximum levels of a score question.
- PROVIDER
- Registry / service name used by nodes (
model.provider: typesafe).
Functions§
- error_
for_ status - Map a documented HTTP status to an error.
- normalize_
format - Map a format name or media type to
png/jpg.