Skip to content

CollectedToolApproval

Namespace: Vercel.AI.GenerateText

public sealed class CollectedToolApproval

One approval that still needs execution or denial handling.

Inheritance: object

View source

CollectedToolApproval(ApprovalRequestPart, ApprovalResponsePart, ApprovalToolCallPart, ApprovalToolResultPart?)

Section titled “CollectedToolApproval(ApprovalRequestPart, ApprovalResponsePart, ApprovalToolCallPart, ApprovalToolResultPart?)”
public CollectedToolApproval(ApprovalRequestPart approvalRequest, ApprovalResponsePart approvalResponse, ApprovalToolCallPart toolCall, ApprovalToolResultPart? existingToolResult = null)

Creates a collected approval.

Parameters

Name Type Description
approvalRequest ApprovalRequestPart
approvalResponse ApprovalResponsePart
toolCall ApprovalToolCallPart
existingToolResult ApprovalToolResultPart

View source

public ApprovalRequestPart ApprovalRequest { get; }

Matching approval request.

Value: ApprovalRequestPart

View source

public ApprovalResponsePart ApprovalResponse { get; }

Approval response.

Value: ApprovalResponsePart

View source

public ApprovalToolResultPart? ExistingToolResult { get; }

Existing tool result, when a denied call already has an execution-denied output.

Value: ApprovalToolResultPart

View source

public ApprovalToolCallPart ToolCall { get; }

Tool call the approval refers to.

Value: ApprovalToolCallPart

View source

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