Skip to content

DecisionClient

Defined in: core/src/decisions.ts:121

readonly host: DecisionHost;

Defined in: core/src/decisions.ts:122


readonly model: string;

Defined in: core/src/decisions.ts:123

ask<Q>(
state,
questions,
opts?
): Promise<DecisionReply<Q>>;

Defined in: core/src/decisions.ts:124

Type Parameter
Q extends Record<string, DecisionQuestion>
Parameter Type
state unknown
questions Q
opts? { signal?: AbortSignal; }
opts.signal? AbortSignal

Promise<DecisionReply<Q>>


checkConnection(opts?): Promise<void>;

Defined in: core/src/decisions.ts:133

Proves the key, the account and the model work, with one real question: about 40 input tokens, a few millionths of a dollar. A free read (a model list, a balance) proves only the key, not that this account can run this model. Vercel has no such free read. Throws the classified failure.

Parameter Type
opts? { signal?: AbortSignal; }
opts.signal? AbortSignal

Promise<void>