TypeSafeSchema unstable
Codecs for the TypeSafe System One API.
Schemas
A System One answer.
Signature
declare const Answer: Union<readonly [Struct<{ readonly choice: String; readonly confidence: Number; readonly probabilities: $Record<String, Number>; readonly type: Literal<"choice">;}>, Struct<{ readonly confidence: Number; readonly legend: optional<$Record<String, String>>; readonly probabilities: $Record<String, Number>; readonly score: Number; readonly type: Literal<"score">;}>, Struct<{ readonly noul: Number; readonly type: Literal<"noul">;}>]>ChoiceAnswer
unstable Since v4.0.0 Source
A classification distribution.
Signature
declare const ChoiceAnswer: Struct<{ readonly choice: String; readonly confidence: Number; readonly probabilities: $Record<String, Number>; readonly type: Literal<"choice">;}>ChoiceQuestion
unstable Since v4.0.0 Source
A classification question.
Signature
declare const ChoiceQuestion: Struct<{ readonly criteria: $Record<String, String>; readonly instructions: String; readonly type: Literal<"choice">;}>ListModelsResponse
unstable Since v4.0.0 Source
Available TypeSafe models.
Signature
declare const ListModelsResponse: Struct<{ readonly models: $Array<Struct<{ readonly description: optional<String>; readonly name: String; readonly release_date: optional<String>; }>>;}>NoulAnswer
unstable Since v4.0.0 Source
A Bernoulli probability.
Signature
declare const NoulAnswer: Struct<{ readonly noul: Number; readonly type: Literal<"noul">;}>NoulQuestion
unstable Since v4.0.0 Source
A probability question.
Signature
declare const NoulQuestion: Struct<{ readonly criteria: optional<Struct<{ readonly false: String; readonly true: String; }>>; readonly instructions: String; readonly type: Literal<"noul">;}>A System One question.
Signature
declare const Question: Union<readonly [Struct<{ readonly criteria: $Record<String, String>; readonly instructions: String; readonly type: Literal<"choice">;}>, Struct<{ readonly criteria: $Array<String>; readonly instructions: String; readonly type: Literal<"score">;}>, Struct<{ readonly criteria: optional<Struct<{ readonly false: String; readonly true: String; }>>; readonly instructions: String; readonly type: Literal<"noul">;}>]>ScoreAnswer
unstable Since v4.0.0 Source
A zero-based rating and index-keyed distribution.
Signature
declare const ScoreAnswer: Struct<{ readonly confidence: Number; readonly legend: optional<$Record<String, String>>; readonly probabilities: $Record<String, Number>; readonly score: Number; readonly type: Literal<"score">;}>ScoreQuestion
unstable Since v4.0.0 Source
An ordered rating question.
Signature
declare const ScoreQuestion: Struct<{ readonly criteria: $Array<String>; readonly instructions: String; readonly type: Literal<"score">;}>SystemOneRequest
unstable Since v4.0.0 Source
A batch of questions against encoded state.
Signature
declare const SystemOneRequest: Struct<{ readonly model: String; readonly questions: $Record<String, Union<readonly [Struct<{ readonly criteria: $Record<String, String>; readonly instructions: String; readonly type: Literal<"choice">; }>, Struct<{ readonly criteria: $Array<String>; readonly instructions: String; readonly type: Literal<"score">; }>, Struct<{ readonly criteria: optional<Struct<{ readonly false: String; readonly true: String; }>>; readonly instructions: String; readonly type: Literal<"noul">; }>]>>; readonly state: Codec<Json, Json, never, never>;}>SystemOneResponse
unstable Since v4.0.0 Source
Answers and token usage for a batch.
Signature
declare const SystemOneResponse: Struct<{ readonly answers: $Record<String, Union<readonly [Struct<{ readonly choice: String; readonly confidence: Number; readonly probabilities: $Record<String, Number>; readonly type: Literal<"choice">; }>, Struct<{ readonly confidence: Number; readonly legend: optional<$Record<String, String>>; readonly probabilities: $Record<String, Number>; readonly score: Number; readonly type: Literal<"score">; }>, Struct<{ readonly noul: Number; readonly type: Literal<"noul">; }>]>>; readonly model: String; readonly usage: optional<Struct<{ readonly input_tokens: optional<Number>; readonly output_tokens: optional<Number>; }>>;}>