DecisionRefusalError
Namespace: Vercel.AI.Util
public sealed class DecisionRefusalError : AiSdkError, ISerializable, IErrorMarkersA decision model refused one or more questions.
Inheritance: object → Exception → AiSdkError
Implements: ISerializable, IErrorMarkers
Constructors
Section titled “Constructors”DecisionRefusalError(IReadOnlyList<string>, string, string, string?)
Section titled “DecisionRefusalError(IReadOnlyList<string>, string, string, string?)”public DecisionRefusalError(IReadOnlyList<string> questionIds, string provider, string modelId, string? message = null)Creates the error for the refused questions.
Parameters
| Name | Type | Description |
|---|---|---|
questionIds |
IReadOnlyList<string> | |
provider |
string | |
modelId |
string | |
message |
string |
Fields
Section titled “Fields”ErrorMarker
Section titled “ErrorMarker”public const string ErrorMarker = "vercel.ai.error.AI_DecisionRefusalError"Marker for IsInstance(object).
Value: string
Properties
Section titled “Properties”ModelId
Section titled “ModelId”public string ModelId { get; }Decision model id.
Value: string
Provider
Section titled “Provider”public string Provider { get; }Decision provider id.
Value: string
QuestionIds
Section titled “QuestionIds”public IReadOnlyList<string> QuestionIds { get; }Refused question ids, in question order.
Value: IReadOnlyList<string>
Methods
Section titled “Methods”IsInstance(object?)
Section titled “IsInstance(object?)”public static bool IsInstance(object? error)Returns whether <code class=“paramref”>error</code> carries this error’s marker.
Parameters
| Name | Type | Description |
|---|---|---|
error |
object |
Returns: bool
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product