Skip to content

ToolApprovalRequestPart

Namespace: Vercel.AI

public sealed class ToolApprovalRequestPart : TextStreamPart

A provider-executed tool call needs approval before the provider runs it.

Inheritance: object → TextStreamPart

View source

ToolApprovalRequestPart(GeneratedToolApprovalRequest)

Section titled “ToolApprovalRequestPart(GeneratedToolApprovalRequest)”
public ToolApprovalRequestPart(GeneratedToolApprovalRequest request)

Creates a tool-approval-request part.

Parameters

Name Type Description
request GeneratedToolApprovalRequest

View source

public string ApprovalId { get; }

Approval id the response must carry.

Value: string

View source

public GeneratedToolCall ToolCall { get; }

The tool call that needs approval.

Value: GeneratedToolCall

View source

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