GatewayDecisionModel
Namespace: Vercel.AI.Gateway
public sealed class GatewayDecisionModel : IEvaluationDecisionCaller, IDecisionCaller, IEvaluationCallerAnswers questions through the Gateway /decision-model route.
Inheritance: object
Implements: IEvaluationDecisionCaller, IDecisionCaller, IEvaluationCaller
Constructors
Section titled “Constructors”GatewayDecisionModel(GatewayProvider, string)
Section titled “GatewayDecisionModel(GatewayProvider, string)”public GatewayDecisionModel(GatewayProvider provider, string modelId)Creates a decision model.
Parameters
| Name | Type | Description |
|---|---|---|
provider |
GatewayProvider | |
modelId |
string |
Properties
Section titled “Properties”ModelId
Section titled “ModelId”public string ModelId { get; }Model id.
Value: string
Provider
Section titled “Provider”public string Provider { get; }Provider id.
Value: string
SpecificationVersion
Section titled “SpecificationVersion”public string SpecificationVersion { get; }Specification version. Only v4 is accepted.
Value: string
SupportedQuestionTypes
Section titled “SupportedQuestionTypes”public IReadOnlyList<string> SupportedQuestionTypes { get; }Question types this model can answer.
Value: IReadOnlyList<string>
Methods
Section titled “Methods”DoDecideAsync(DecisionModelCall, CancellationToken)
Section titled “DoDecideAsync(DecisionModelCall, CancellationToken)”public Task<DecisionModelResult> DoDecideAsync(DecisionModelCall call, CancellationToken cancellationToken = default)Sends the state and every question in one request.
Parameters
| Name | Type | Description |
|---|---|---|
call |
DecisionModelCall | |
cancellationToken |
CancellationToken |
Returns: Task<DecisionModelResult>
DoEvaluateAsync(EvaluationModelCall, CancellationToken)
Section titled “DoEvaluateAsync(EvaluationModelCall, CancellationToken)”[Obsolete("Use DoDecideAsync instead.")]public Task<EvaluationModelResult> DoEvaluateAsync(EvaluationModelCall call, CancellationToken cancellationToken)Deprecated. Use CancellationToken).
Parameters
| Name | Type | Description |
|---|---|---|
call |
EvaluationModelCall | |
cancellationToken |
CancellationToken |
Returns: Task<EvaluationModelResult>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product