NoSuchToolError
Namespace: Vercel.AI.Util
public sealed class NoSuchToolError : AiSdkError, ISerializable, IErrorMarkersThe model called a tool that is not available. Maps to NoSuchToolError.
Inheritance: object → Exception → AiSdkError
Implements: ISerializable, IErrorMarkers
Constructors
Section titled “Constructors”NoSuchToolError(string, IReadOnlyList<string>?, string?)
Section titled “NoSuchToolError(string, IReadOnlyList<string>?, string?)”public NoSuchToolError(string toolName, IReadOnlyList<string>? availableTools = null, string? message = null)Creates the error. <code class=“paramref”>message</code> defaults to the upstream format.
Parameters
| Name | Type | Description |
|---|---|---|
toolName |
string | |
availableTools |
IReadOnlyList<string> | |
message |
string |
Fields
Section titled “Fields”ErrorMarker
Section titled “ErrorMarker”public const string ErrorMarker = "vercel.ai.error.AI_NoSuchToolError"Marker for IsInstance(object).
Value: string
Properties
Section titled “Properties”AvailableTools
Section titled “AvailableTools”public IReadOnlyList<string>? AvailableTools { get; }Names of the available tools, or null when no tools were set.
Value: IReadOnlyList<string>
ToolName
Section titled “ToolName”public string ToolName { get; }Name of the tool that was called.
Value: 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