Skip to content

Requests and responses

The body of POST /v1/systemone and its response, as pydantic models (flide.api.schema). The API page shows them as JSON.

schema

The request and response types; they live with the model families (formats/schema.py) and import from here too.

SystemOneRequest

Bases: _Lenient

One state and the questions asked about it. state is any JSON value (text, an object, chat messages), which the family renders; questions maps a name to each question, and the answers come back under the same names. model is the served model's name, one of its aliases or "jev-latest". Undeclared keys such as images are kept for the family that reads them.

NoulQuestion

Bases: _Lenient

A yes-or-no question. Its answer is the probability of true.

NoulCriteria

Bases: _Lenient

What true and what false mean for a noul question; either may be left out.

ChoiceQuestion

Bases: _Lenient

One of several options. criteria maps each option's name to what it means (1 to 256 options); the answer gives every option's probability under the same names.

ScoreQuestion

Bases: _Lenient

A level on an ordered scale. criteria lists the levels from the lowest (1 to 256); the answer is keyed by each level's index as a string, "0" for the first.

SystemOneResponse

Bases: BaseModel

The answer to a SystemOneRequest: the served model's name, an answer under each question's name, and usage.

NoulAnswer

Bases: BaseModel

noul: the probability of true, from 0 to 1.

ChoiceAnswer

Bases: BaseModel

choice: the most probable option; probabilities: every option's, summing to 1; confidence: the top probability rescaled from uniform (0) to certain (1), as api/answers.py computes it.

ScoreAnswer

Bases: BaseModel

score: the expected level index under probabilities (keyed "0", "1", ...); legend: the level each index stands for, as the question gave it; confidence: 1 when every bit of probability is on the most likely level, 0 when it is spread as widely as the uniform distribution or wider.

Usage

Bases: BaseModel

input_tokens: the tokens Flide read for the request; output_tokens: one per question answered.