Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.45.0/resources/mod.ts";

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

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

definition:
| "none"
| "auto"
| "required"