ToolChoice
Namespace: Vercel.AI.Provider
public abstract class ToolChoiceHow the model should choose tools. Maps to toolChoice.
Inheritance: object
Derived: ToolChoice.NamedChoice
Properties
Section titled “Properties”public static ToolChoice Auto { get; }The model may call tools.
Value: ToolChoice
public static ToolChoice None { get; }The model must not call tools.
Value: ToolChoice
Required
Section titled “Required”public static ToolChoice Required { get; }The model must call a tool.
Value: ToolChoice
public string Type { get; }Choice type: auto, none, required, or tool.
Value: string
Methods
Section titled “Methods”Tool(string)
Section titled “Tool(string)”public static ToolChoice Tool(string toolName)The model must call <code class=“paramref”>toolName</code>.
Parameters
| Name | Type | Description |
|---|---|---|
toolName |
string |
Returns: ToolChoice
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product