Skip to content

TypeValidationException

Namespace: Vercel.AI.GenerateText

public sealed class TypeValidationException : AiSdkException, ISerializable

Tool context failed schema validation. Maps to TypeValidationError.

Inheritance: object → Exception → AiSdkException

Implements: ISerializable

View source

TypeValidationException(object?, string, string)

Section titled “TypeValidationException(object?, string, string)”
public TypeValidationException(object? value, string field, string entityName)

Creates the exception.

Parameters

Name Type Description
value object
field string
entityName string

View source

public ToolValidationContext Context { get; }

Field and entity that failed.

Value: ToolValidationContext

View source

public object? Value { get; }

Value that failed validation.

Value: object

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product