Skip to main content

Response

typesafe_sdk.SystemOneResponse

Bases: Response Answers grouped by question type with model and usage metadata. See System One for details.

request_id

cached property The x-typesafe-request-id response header.

raw_http_response

property
The underlying httpx2.Response, exposing status, headers, and body.

model

instance-attribute The model used to answer the request.

usage

instance-attribute Token usage for the request.

answers

class-attribute instance-attribute All answer objects keyed by question name.

nouls

cached property Yes/no answers keyed by question name.

choices

cached property Choice answers keyed by question name.

scores

cached property Score answers keyed by question name.

typesafe_sdk.Usage

Bases: msgspec.Struct Token counts for a request, when reported by the API.

input_tokens

class-attribute instance-attribute Number of input tokens used, or None when the API did not report it.

output_tokens

class-attribute instance-attribute Number of output tokens used, or None when the API did not report it.

Answers

typesafe_sdk.NoulAnswer

Bases: wire.NoulAnswer A yes/no answer. See the noul primitive for details.

noul

instance-attribute Probability of a yes answer, from zero to one.

typesafe_sdk.ChoiceAnswer

Bases: wire.ChoiceAnswer A selected label and its probabilities. See the choice primitive for details.

choice

instance-attribute The selected label.

confidence

instance-attribute Reported confidence in the selected label.

probabilities

instance-attribute Probabilities keyed by label.

typesafe_sdk.ScoreAnswer

Bases: wire.ScoreAnswer An expected score with its rubric and probabilities. See the score primitive for details.

score

instance-attribute Expected score, which may fall between the integer rubric levels.

confidence

instance-attribute Reported confidence in the score.

legend

instance-attribute Rubric descriptions keyed by integer score.

probabilities

instance-attribute Probabilities keyed by integer score.

typesafe_sdk.Answer

module-attribute An answer to a single question, identified by its type.

Available models

typesafe_sdk.ListModelsResponse

Bases: Response The models available to the account.

request_id

cached property The x-typesafe-request-id response header.

raw_http_response

property
The underlying httpx2.Response, exposing status, headers, and body.

models

instance-attribute The available models.

typesafe_sdk.ModelMetadata

Bases: Struct

name

instance-attribute

description

instance-attribute

release_date

instance-attribute