class

OpenAI::FunctionTool

Inherits JSON::Serializable < Reference < Object

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

Constructors

new(type_value : FunctionToolType = FunctionToolType::Function, name : String = "", description : FunctionToolDescription | Nil = nil, parameters : FunctionToolParameters = nil, strict : FunctionToolStrict = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

description
Source
description=(description : FunctionToolDescription | Nil)
Source
name

The name of the function to call.

Source
name=(name : String)

The name of the function to call.

Source
parameters
Source
parameters=(parameters : FunctionToolParameters)
Source
strict
Source
strict=(strict : FunctionToolStrict)
Source
type_value

The type of the function tool. Always function.

Source
type_value=(type_value : FunctionToolType)

The type of the function tool. Always function.

Source