struct
AI::Provider::LanguageModel::ResponseFormat
- AI::Provider::LanguageModel::ResponseFormat
- Struct
- Value
- Object
Overview
Response format configuration.
Included Modules
- JSON::Serializable
Defined in:
ai/provider/language_model/call_options.crConstructors
- .json(schema : JSON::Any | Nil = nil, name : String | Nil = nil, description : String | Nil = nil) : ResponseFormat
- .new(pull : JSON::PullParser)
- .new(type : ResponseFormatType, schema : JSON::Any | Nil = nil, name : String | Nil = nil, description : String | Nil = nil)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
- .text : ResponseFormat
Instance Method Summary
-
#description : String | Nil
Description of output (used by some providers).
-
#name : String | Nil
Name of output (used by some providers).
-
#schema : JSON::Any | Nil
JSON schema for JSON response format.
- #type : ResponseFormatType
Constructor Detail
def self.json(schema : JSON::Any | Nil = nil, name : String | Nil = nil, description : String | Nil = nil) : ResponseFormat
#
def self.new(type : ResponseFormatType, schema : JSON::Any | Nil = nil, name : String | Nil = nil, description : String | Nil = nil)
#