Class: OpenAI::Models::Beta::Responses::InputTokenCountParams::Text
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::Responses::InputTokenCountParams::Text
- Defined in:
- lib/openai/models/beta/responses/input_token_count_params.rb,
sig/openai/models/beta/responses/input_token_count_params.rbs
Defined Under Namespace
Modules: Verbosity
Instance Attribute Summary collapse
-
#format_ ⇒ OpenAI::Models::Beta::beta_response_format_text_config?
An object specifying the format that the model must output.
-
#verbosity ⇒ OpenAI::Models::Beta::Responses::InputTokenCountParams::Text::verbosity?
Constrains the verbosity of the model's response.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(format_: nil, verbosity: nil) ⇒ Text
constructor
A new instance of Text.
- #to_hash ⇒ { ?format_: OpenAI::Models::Beta::beta_response_format_text_config, ?verbosity: OpenAI::Models::Beta::Responses::InputTokenCountParams::Text::verbosity? }
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(format_: nil, verbosity: nil) ⇒ Text
Returns a new instance of Text.
|
|
# File 'lib/openai/models/beta/responses/input_token_count_params.rb', line 519
|
Instance Attribute Details
#format_ ⇒ OpenAI::Models::Beta::beta_response_format_text_config?
An object specifying the format that the model must output.
Configuring { "type": "json_schema" } enables Structured Outputs, which
ensures the model will match your supplied JSON schema. Learn more in the
Structured Outputs guide.
The default format is { "type": "text" } with no additional options.
Not recommended for gpt-4o and newer models:
Setting to { "type": "json_object" } enables the older JSON mode, which
ensures the message the model generates is valid JSON. Using json_schema is
preferred for models that support it.
504 |
# File 'lib/openai/models/beta/responses/input_token_count_params.rb', line 504 optional :format_, union: -> { OpenAI::Beta::BetaResponseFormatTextConfig }, api_name: :format |
#verbosity ⇒ OpenAI::Models::Beta::Responses::InputTokenCountParams::Text::verbosity?
Constrains the verbosity of the model's response. Lower values will result in
more concise responses, while higher values will result in more verbose
responses. Currently supported values are low, medium, and high. The
default is medium.
513 514 515 516 517 |
# File 'lib/openai/models/beta/responses/input_token_count_params.rb', line 513 optional( :verbosity, enum: -> { OpenAI::Beta::Responses::InputTokenCountParams::Text::Verbosity }, nil?: true ) |
Instance Method Details
#to_hash ⇒ { ?format_: OpenAI::Models::Beta::beta_response_format_text_config, ?verbosity: OpenAI::Models::Beta::Responses::InputTokenCountParams::Text::verbosity? }
478 479 480 481 |
# File 'sig/openai/models/beta/responses/input_token_count_params.rbs', line 478
def to_hash: -> {
?format_: OpenAI::Models::Beta::beta_response_format_text_config,
?verbosity: OpenAI::Models::Beta::Responses::InputTokenCountParams::Text::verbosity?
}
|