Skip to content

AnthropicBashTool

Namespace: Vercel.AI.Anthropic

public static class AnthropicBashTool

Runs a bash provider tool through a caller-supplied sandbox.

Inheritance: object

View source

ExecuteAsync(string, Func<string, CancellationToken, Task<AnthropicBashResult>>, CancellationToken)

Section titled “ExecuteAsync(string, Func<string, CancellationToken, Task<AnthropicBashResult>>, CancellationToken)”
public static Task<AnthropicBashResult> ExecuteAsync(string command, Func<string, CancellationToken, Task<AnthropicBashResult>> sandbox, CancellationToken cancellationToken)

Executes <code class=“paramref”>command</code> and forwards <code class=“paramref”>cancellationToken</code> to the sandbox.

Parameters

Name Type Description
command string
sandbox Func<string, CancellationToken, Task<AnthropicBashResult>>
cancellationToken CancellationToken

Returns: Task<AnthropicBashResult>

View source

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