ActiveToolFilter
Namespace: Vercel.AI.GenerateText
public static class ActiveToolFilterActive-tool filtering. Maps to filterActiveTools.
Inheritance: object
Methods
Section titled “Methods”FilterActiveTools<T>(IReadOnlyDictionary<string, T>?, IReadOnlyList<string>?)
Section titled “FilterActiveTools<T>(IReadOnlyDictionary<string, T>?, IReadOnlyList<string>?)”public static IReadOnlyDictionary<string, T>? FilterActiveTools<T>(IReadOnlyDictionary<string, T>? tools, IReadOnlyList<string>? activeTools)Keeps tools whose names are in <code class=“paramref”>activeTools</code>. A null tool set stays null. A null active-tool list returns <code class=“paramref”>tools</code> unchanged.
Type parameters
| Name | Description |
|---|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
tools |
IReadOnlyDictionary<string, T> | |
activeTools |
IReadOnlyList<string> |
Returns: IReadOnlyDictionary<string, T>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product