ToolSearchState
Namespace: Vercel.AI.Operations
public static class ToolSearchStatePer-generation discovery state. Maps to createToolSearchState.
Inheritance: object
Methods
Section titled “Methods”Create(IReadOnlyDictionary<string, SearchableTool>?, IReadOnlyDictionary<string, IReadOnlyList<string>>?)
Section titled “Create(IReadOnlyDictionary<string, SearchableTool>?, IReadOnlyDictionary<string, IReadOnlyList<string>>?)”public static Func<IReadOnlyDictionary<string, SearchableTool>?, IReadOnlyDictionary<string, object?>?, IReadOnlyDictionary<string, SearchableTool>?> Create(IReadOnlyDictionary<string, SearchableTool>? tools, IReadOnlyDictionary<string, IReadOnlyList<string>>? toolCallers)Creates a prepare function. An empty routing map does not inherit keys such as constructor.
Parameters
| Name | Type | Description |
|---|---|---|
tools |
IReadOnlyDictionary<string, SearchableTool> | |
toolCallers |
IReadOnlyDictionary<string, IReadOnlyList<string>> |
Tokenize(string)
Section titled “Tokenize(string)”public static List<string> Tokenize(string text)Splits camel case, then keeps letters and numbers.
Parameters
| Name | Type | Description |
|---|---|---|
text |
string |
Returns: List<string>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product