Skip to content

ToolExecutionOptions

Namespace: Vercel.AI

public sealed class ToolExecutionOptions

The options a tool receives when it runs. Maps to the second argument of execute.

Inheritance: object

View source

ToolExecutionOptions(string, IReadOnlyList<ModelMessage>, CancellationToken)

Section titled “ToolExecutionOptions(string, IReadOnlyList<ModelMessage>, CancellationToken)”
public ToolExecutionOptions(string toolCallId, IReadOnlyList<ModelMessage> messages, CancellationToken abortSignal)

Creates the options.

Parameters

Name Type Description
toolCallId string
messages IReadOnlyList<ModelMessage>
abortSignal CancellationToken

View source

public CancellationToken AbortSignal { get; }

Cancellation signal of the call.

Value: CancellationToken

View source

public IReadOnlyList<ModelMessage> Messages { get; }

Messages sent to the model in the step that made the call.

Value: IReadOnlyList<ModelMessage>

View source

public string ToolCallId { get; }

Id of the tool call.

Value: string

View source

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