BatchTool
Namespace: Vercel.AI.Operations
public sealed class BatchToolA tool definition forwarded to a batch without being executed.
Inheritance: object
Constructors
Section titled “Constructors”BatchTool(string, JsonElement, string?, Func<JsonElement, CancellationToken, Task<object?>>?)
Section titled “BatchTool(string, JsonElement, string?, Func<JsonElement, CancellationToken, Task<object?>>?)”public BatchTool(string name, JsonElement inputSchema, string? description = null, Func<JsonElement, CancellationToken, Task<object?>>? execute = null)Creates a tool definition.
Parameters
| Name | Type | Description |
|---|---|---|
name |
string | |
inputSchema |
JsonElement | |
description |
string | |
execute |
Func<JsonElement, CancellationToken, Task<object>> |
Properties
Section titled “Properties”Description
Section titled “Description”public string? Description { get; }Description.
Value: string
Execute
Section titled “Execute”public Func<JsonElement, CancellationToken, Task<object?>>? Execute { get; }Local execute function. Batch submission does not call it.
Value: Func<JsonElement, CancellationToken, Task<object>>
InputSchema
Section titled “InputSchema”public JsonElement InputSchema { get; }JSON schema.
Value: JsonElement
public string Name { get; }Tool name.
Value: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product