Use this option to force the model to call a specific function.

interface ToolChoiceFunction {
    name: string;
    type: "function";
}

Properties

Properties

name: string

The name of the function to call.

type: "function"

For function calling, the type is always function.