Skip to content

ToolChoices

Namespace: Vercel.AI.Prompt

public static class ToolChoices

Tool-choice normalization. Maps to prepareToolChoice.

Inheritance: object

View source

public static PreparedToolChoice PrepareToolChoice(string? toolChoice)

Returns auto when <code class=“paramref”>toolChoice</code> is null. String values are auto, none, or required.

Parameters

Name Type Description
toolChoice string

Returns: PreparedToolChoice

View source

public static PreparedToolChoice PrepareToolChoice(ToolChoice? toolChoice)

Returns auto when <code class=“paramref”>toolChoice</code> is null.

Parameters

Name Type Description
toolChoice ToolChoice

Returns: PreparedToolChoice

View source

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