Class: OpenAI::Models::Beta::BetaCustomTool::Format::Grammar
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::BetaCustomTool::Format::Grammar
- Defined in:
- lib/openai/models/beta/beta_custom_tool.rb,
sig/openai/models/beta/beta_custom_tool.rbs
Defined Under Namespace
Modules: Syntax
Instance Attribute Summary collapse
-
#definition ⇒ String
The grammar definition.
-
#syntax ⇒ OpenAI::Models::Beta::BetaCustomTool::Format::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::Beta::BetaCustomTool::Format::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/beta/beta_custom_tool.rb', line 136
|
Instance Attribute Details
#definition ⇒ String
The grammar definition.
122 |
# File 'lib/openai/models/beta/beta_custom_tool.rb', line 122 required :definition, String |
#syntax ⇒ OpenAI::Models::Beta::BetaCustomTool::Format::Grammar::syntax
The syntax of the grammar definition. One of lark or regex.
128 |
# File 'lib/openai/models/beta/beta_custom_tool.rb', line 128 required :syntax, enum: -> { OpenAI::Beta::BetaCustomTool::Format::Grammar::Syntax } |
#type ⇒ :grammar
Grammar format. Always grammar.
134 |
# File 'lib/openai/models/beta/beta_custom_tool.rb', line 134 required :type, const: :grammar |
Instance Method Details
#to_hash ⇒ { definition: String, syntax: OpenAI::Models::Beta::BetaCustomTool::Format::Grammar::syntax, ?type: :grammar }
150 151 152 153 154 |
# File 'sig/openai/models/beta/beta_custom_tool.rbs', line 150
def to_hash: -> {
definition: String,
syntax: OpenAI::Models::Beta::BetaCustomTool::Format::Grammar::syntax,
?type: :grammar
}
|