FunctionTool interface

在您自己的程式代碼中定義函式,模型可以選擇呼叫。 深入瞭解 函式呼叫

Extends

屬性

allowed_callers

可能會啟動此工具的來電者。

defer_loading

這個功能是否被延遲並透過工具搜尋載入。

description

函數工具的說明。

name

要呼叫的函式名稱。

output_schema

函式輸出的結構。

parameters

函式的參數結構。

strict

函式參數是否必須嚴格符合參數結構。

type

函式工具的類型。 一律為 function

屬性詳細資料

allowed_callers

可能會啟動此工具的來電者。

allowed_callers?: CallableToolAllowedCaller[]

屬性值

defer_loading

這個功能是否被延遲並透過工具搜尋載入。

defer_loading?: boolean

屬性值

boolean

description

函數工具的說明。

description?: string

屬性值

string

name

要呼叫的函式名稱。

name: string

屬性值

string

output_schema

函式輸出的結構。

output_schema?: Record<string, unknown>

屬性值

Record<string, unknown>

parameters

函式的參數結構。

parameters?: Record<string, unknown>

屬性值

Record<string, unknown>

strict

函式參數是否必須嚴格符合參數結構。

strict?: boolean

屬性值

boolean

type

函式工具的類型。 一律為 function

type: "function"

屬性值

"function"