Share via


FunctionTool interface

Defines a function in your own code the model can choose to call. Learn more about function calling.

Extends

Properties

description

A description of the function tool.

name

The name of the function to call.

parameters

The parameters schema for the function.

strict

Whether the function arguments must strictly match the parameters schema.

type

The type of the function tool. Always function.

Property Details

description

A description of the function tool.

description?: string

Property Value

string

name

The name of the function to call.

name: string

Property Value

string

parameters

The parameters schema for the function.

parameters: Record<string, unknown>

Property Value

Record<string, unknown>

strict

Whether the function arguments must strictly match the parameters schema.

strict: boolean

Property Value

boolean

type

The type of the function tool. Always function.

type: "function"

Property Value

"function"