struct AI::Provider::LanguageModel::ResponseFormat

Overview

Response format configuration.

Included Modules

Defined in:

ai/provider/language_model/call_options.cr

Constructors

Instance Method Summary

Constructor Detail

def self.json(schema : JSON::Any | Nil = nil, name : String | Nil = nil, description : String | Nil = nil) : ResponseFormat #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(type : ResponseFormatType, schema : JSON::Any | Nil = nil, name : String | Nil = nil, description : String | Nil = nil) #

[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]
def self.text : ResponseFormat #

[View source]

Instance Method Detail

def description : String | Nil #

Description of output (used by some providers).


[View source]
def name : String | Nil #

Name of output (used by some providers).


[View source]
def schema : JSON::Any | Nil #

JSON schema for JSON response format.


[View source]
def type : ResponseFormatType #

[View source]