Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/openai/resources/mod.ts>ChatCompletionToolChoiceOption

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
type alias ChatCompletionToolChoiceOption
import { type ChatCompletionToolChoiceOption } from "https://deno.land/x/openai@v4.24.3/resources/mod.ts";

Controls which (if any) function is called by the model. none means the model will not call a function and instead generates a message. auto means the model can pick between generating a message or calling a function. Specifying a particular function via {"type: "function", "function": {"name": "my_function"}} forces the model to call that function.

none is the default when no functions are present. auto is the default if functions are present.

definition: "none" | "auto" | ChatCompletionNamedToolChoice