class

OpenAI::ResponseFormatTextGrammar

Inherits JSON::Serializable < Reference < Object

A custom grammar for the model to follow when generating text. Learn more in the custom grammars guide.

Constructors

new(type_value : ResponseFormatTextGrammarType = ResponseFormatTextGrammarType::Grammar, grammar : String = "")
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

grammar

The custom grammar for the model to follow.

Source
grammar=(grammar : String)

The custom grammar for the model to follow.

Source
type_value

The type of response format being defined. Always grammar.

Source
type_value=(type_value : ResponseFormatTextGrammarType)

The type of response format being defined. Always grammar.

Source