Skip to content

DecisionResult

Defined in: src/decisions/types.ts:95

Result returned by DecisionModel.ask, keyed by the same identifiers as the input question map.

Type ParameterDefault typeDescription
Q extends Record<string, Question>Record<string, Question>The question map passed to ask.
answers: { [K in string | number | symbol]: AnswerOf<Q[K]> };

Defined in: src/decisions/types.ts:97

Per-question answer, statically narrowed from each question’s choices.


optional usage?: {
inputTokens: number;
outputTokens: number;
totalTokens: number;
};

Defined in: src/decisions/types.ts:99

Aggregate token usage for the underlying model call(s), when the provider reports it.

inputTokens: number;
outputTokens: number;
totalTokens: number;

metadata: {
latencyMs: number;
};

Defined in: src/decisions/types.ts:105

Per-call metadata recorded by the implementation.

latencyMs: number;

Time spent in the underlying model call, in milliseconds.