ParseToolCallOptions
Namespace: Vercel.AI.GenerateText
public sealed class ParseToolCallOptionsOptions of CancellationToken). Maps to the options of parseToolCall.
Inheritance: object
Constructors
Section titled “Constructors”ParseToolCallOptions(GeneratedToolCall)
Section titled “ParseToolCallOptions(GeneratedToolCall)”public ParseToolCallOptions(GeneratedToolCall toolCall)Creates options for <code class=“paramref”>toolCall</code>.
Parameters
| Name | Type | Description |
|---|---|---|
toolCall |
GeneratedToolCall |
Properties
Section titled “Properties”Instructions
Section titled “Instructions”public Instructions? Instructions { get; init; }The instructions given to the model. They are passed to RepairToolCall.
Value: Instructions
Messages
Section titled “Messages”public IReadOnlyList<ModelMessage>? Messages { get; init; }The messages of the current step. They are passed to RepairToolCall.
Value: IReadOnlyList<ModelMessage>
RefineToolInput
Section titled “RefineToolInput”public IReadOnlyDictionary<string, Func<JsonElement, CancellationToken, Task<JsonElement>>>? RefineToolInput { get; init; }Refines the input of a valid call, keyed by tool name. A tool without an entry keeps its parsed input.
Maps to refineToolInput.
Value: IReadOnlyDictionary<string, Func<JsonElement, CancellationToken, Task<JsonElement>>>
RepairToolCall
Section titled “RepairToolCall”public ToolCallRepairFunction? RepairToolCall { get; init; }Repairs a call whose tool is unknown or whose input is invalid. Maps to repairToolCall.
Value: ToolCallRepairFunction
ToolCall
Section titled “ToolCall”public GeneratedToolCall ToolCall { get; }The call to parse.
Value: GeneratedToolCall
public IReadOnlyList<Tool>? Tools { get; init; }The available tools. Null means no tools were set, which differs from an empty list in the NoSuchToolError message.
Value: IReadOnlyList<Tool>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product