Skip to content

ToolSearchState

Namespace: Vercel.AI.Operations

public static class ToolSearchState

Per-generation discovery state. Maps to createToolSearchState.

Inheritance: object

View source

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>>

Returns: Func<IReadOnlyDictionary<string, SearchableTool>, IReadOnlyDictionary<string, object>, IReadOnlyDictionary<string, SearchableTool>>

View source

public static List<string> Tokenize(string text)

Splits camel case, then keeps letters and numbers.

Parameters

Name Type Description
text string

Returns: List<string>

View source

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