Class: OpenAI::Models::CustomToolInputFormat::Grammar
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::CustomToolInputFormat::Grammar
- Defined in:
- lib/openai/models/custom_tool_input_format.rb,
sig/openai/models/custom_tool_input_format.rbs
Defined Under Namespace
Modules: Syntax
Instance Attribute Summary collapse
-
#definition ⇒ String
The grammar definition.
-
#syntax ⇒ OpenAI::Models::CustomToolInputFormat::Grammar::syntax
The syntax of the grammar definition.
-
#type ⇒ :grammar
Grammar format.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(definition:, syntax:, type: :grammar) ⇒ Grammar
constructor
A new instance of Grammar.
- #to_hash ⇒ { definition: String, syntax: OpenAI::Models::CustomToolInputFormat::Grammar::syntax, ?type: :grammar }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(definition:, syntax:, type: :grammar) ⇒ Grammar
Returns a new instance of Grammar.
|
|
# File 'lib/openai/models/custom_tool_input_format.rb', line 50
|
Instance Attribute Details
#definition ⇒ String
The grammar definition.
36 |
# File 'lib/openai/models/custom_tool_input_format.rb', line 36 required :definition, String |
#syntax ⇒ OpenAI::Models::CustomToolInputFormat::Grammar::syntax
The syntax of the grammar definition. One of lark or regex.
42 |
# File 'lib/openai/models/custom_tool_input_format.rb', line 42 required :syntax, enum: -> { OpenAI::CustomToolInputFormat::Grammar::Syntax } |
#type ⇒ :grammar
Grammar format. Always grammar.
48 |
# File 'lib/openai/models/custom_tool_input_format.rb', line 48 required :type, const: :grammar |
Instance Method Details
#to_hash ⇒ { definition: String, syntax: OpenAI::Models::CustomToolInputFormat::Grammar::syntax, ?type: :grammar }
52 53 54 55 56 |
# File 'sig/openai/models/custom_tool_input_format.rbs', line 52
def to_hash: -> {
definition: String,
syntax: OpenAI::Models::CustomToolInputFormat::Grammar::syntax,
?type: :grammar
}
|