Skip to content

struct OpenAI::Function
inherits Struct #

In an API call, you can describe functions and have the model intelligently choose to output a JSON object containing arguments to call one or many functions. The Chat Completions API does not call the function; instead, the model generates JSON that you can use to call the function in your code.

Included modules

JSON::Serializable

Constructors#

.new(name : String, arguments : String)#

View source

.new(pull : JSON::PullParser)#

View source

Methods#

#arguments : String#

#clone#

View source

#copy_with(name _name = @name, arguments _arguments = @arguments)#

View source

#name : String#