OpenAI::FunctionParameters
Inherits JSON::Serializable < Reference < Object
The parameters the functions accepts, described as a JSON Schema object. See the guide for examples, and the JSON Schema reference for documentation about the format.
Omitting parameters defines a function with an empty parameter list.
Constructors
new(pull : JSON::PullParser)
Sourcenew(type : String = "object", properties : Hash(String, JSON::Any) = Hash(String, JSON::Any).new, required : Array(String) = [] of String, additional_properties : Bool | Hash(String, JSON::Any) | Nil = nil, pattern_properties : Hash(String, JSON::Any) | Nil = nil, min_properties : Int32 | Nil = nil, max_properties : Int32 | Nil = nil, dependencies : Hash(String, JSON::Any) | Nil = nil, property_names : Hash(String, JSON::Any) | Nil = nil, title : String | Nil = nil, description : String | Nil = nil, default : JSON::Any | Nil = nil, examples : Array(JSON::Any) | Nil = nil, enum __arg0 : Array(JSON::Any) | Nil = nil, const : JSON::Any | Nil = nil, all_of : Array(Hash(String, JSON::Any)) | Nil = nil, any_of : Array(Hash(String, JSON::Any)) | Nil = nil, one_of : Array(Hash(String, JSON::Any)) | Nil = nil, not : Hash(String, JSON::Any) | Nil = nil)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceClass methods
from_type(type : T.class) forall T
Helper method to create a schema from a Crystal type using json-schema shard
Instance methods
additional_properties
Sourceall_of
Sourceany_of
Sourceconst
Sourcedefault
Sourcedependencies
Sourcedescription
Sourceenum
Sourceexamples
Sourcemax_properties
Sourcemin_properties
Sourcenot
Sourceone_of
Sourcepattern_properties
Sourceproperties
Sourceproperty_names
Sourcerequired
Source