ToolApprovalCollection
Namespace: Vercel.AI.GenerateText
public static class ToolApprovalCollectionCollects tool approvals from the last tool message. Maps to collectToolApprovals.
Inheritance: object
Methods
Section titled “Methods”CollectToolApprovals(IReadOnlyList<ApprovalHistoryMessage>)
Section titled “CollectToolApprovals(IReadOnlyList<ApprovalHistoryMessage>)”public static CollectedToolApprovalSet CollectToolApprovals(IReadOnlyList<ApprovalHistoryMessage> messages)Reads approval responses from the last message when it is a tool message. Returns empty lists for every other ending.
Parameters
| Name | Type | Description |
|---|---|---|
messages |
IReadOnlyList<ApprovalHistoryMessage> |
Returns: CollectedToolApprovalSet
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product