DecisionClient
Defined in: core/src/decisions.ts:121
Properties
Section titled “Properties”readonly host: DecisionHost;Defined in: core/src/decisions.ts:122
readonly model: string;Defined in: core/src/decisions.ts:123
Methods
Section titled “Methods”ask<Q>( state, questions, opts?): Promise<DecisionReply<Q>>;Defined in: core/src/decisions.ts:124
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Q extends Record<string, DecisionQuestion> |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
state |
unknown |
questions |
Q |
opts? |
{ signal?: AbortSignal; } |
opts.signal? |
AbortSignal |
Returns
Section titled “Returns”Promise<DecisionReply<Q>>
checkConnection()
Section titled “checkConnection()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts? |
{ signal?: AbortSignal; } |
opts.signal? |
AbortSignal |
Returns
Section titled “Returns”Promise<void>