Class: OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams
- Defined in:
- lib/openai/models/evals/run_create_params.rb,
sig/openai/models/evals/run_create_params.rbs
Overview
Defined Under Namespace
Classes: Text
Instance Attribute Summary collapse
-
#max_completion_tokens ⇒ Integer?
The maximum number of tokens in the generated output.
-
#reasoning_effort ⇒ OpenAI::Models::reasoning_effort?
Constrains effort on reasoning for reasoning models.
-
#seed ⇒ Integer?
A seed value to initialize the randomness, during sampling.
-
#temperature ⇒ Float?
A higher temperature increases randomness in the outputs.
-
#text ⇒ OpenAI::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text?
Configuration options for a text response from the model.
-
#tools ⇒ ::Array[OpenAI::Models::Responses::tool]?
An array of tools the model may call while generating a response.
-
#top_p ⇒ Float?
An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(max_completion_tokens: nil, reasoning_effort: nil, seed: nil, temperature: nil, text: nil, tools: nil, top_p: nil) ⇒ SamplingParams
constructor
A new instance of SamplingParams.
- #to_hash ⇒ { ?max_completion_tokens: Integer, ?reasoning_effort: OpenAI::Models::reasoning_effort?, ?seed: Integer, ?temperature: Float, ?text: OpenAI::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text, ?tools: ::Array[OpenAI::Models::Responses::tool], ?top_p: Float }
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(max_completion_tokens: nil, reasoning_effort: nil, seed: nil, temperature: nil, text: nil, tools: nil, top_p: nil) ⇒ SamplingParams
Returns a new instance of SamplingParams.
|
|
# File 'lib/openai/models/evals/run_create_params.rb', line 744
|
Instance Attribute Details
#max_completion_tokens ⇒ Integer?
The maximum number of tokens in the generated output.
678 |
# File 'lib/openai/models/evals/run_create_params.rb', line 678 optional :max_completion_tokens, Integer |
#reasoning_effort ⇒ OpenAI::Models::reasoning_effort?
Constrains effort on reasoning for reasoning models. Currently supported values
are none, minimal, low, medium, high, xhigh, and max. Reducing
reasoning effort can result in faster responses and fewer tokens used on
reasoning in a response. Not all reasoning models support every value. See the
reasoning guide for
model-specific support.
689 |
# File 'lib/openai/models/evals/run_create_params.rb', line 689 optional :reasoning_effort, enum: -> { OpenAI::ReasoningEffort }, nil?: true |
#seed ⇒ Integer?
A seed value to initialize the randomness, during sampling.
695 |
# File 'lib/openai/models/evals/run_create_params.rb', line 695 optional :seed, Integer |
#temperature ⇒ Float?
A higher temperature increases randomness in the outputs.
701 |
# File 'lib/openai/models/evals/run_create_params.rb', line 701 optional :temperature, Float |
#text ⇒ OpenAI::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text?
Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
711 712 713 714 715 716 |
# File 'lib/openai/models/evals/run_create_params.rb', line 711 optional( :text, -> { OpenAI::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text } ) |
#tools ⇒ ::Array[OpenAI::Models::Responses::tool]?
An array of tools the model may call while generating a response. You can
specify which tool to use by setting the tool_choice parameter.
The two categories of tools you can provide the model are:
- Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools.
- Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling.
736 |
# File 'lib/openai/models/evals/run_create_params.rb', line 736 optional :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::Tool] } |
#top_p ⇒ Float?
An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
742 |
# File 'lib/openai/models/evals/run_create_params.rb', line 742 optional :top_p, Float |
Instance Method Details
#to_hash ⇒ { ?max_completion_tokens: Integer, ?reasoning_effort: OpenAI::Models::reasoning_effort?, ?seed: Integer, ?temperature: Float, ?text: OpenAI::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text, ?tools: ::Array[OpenAI::Models::Responses::tool], ?top_p: Float }
822 823 824 825 826 827 828 829 830 |
# File 'sig/openai/models/evals/run_create_params.rbs', line 822
def to_hash: -> {
?max_completion_tokens: Integer,
?reasoning_effort: OpenAI::Models::reasoning_effort?,
?seed: Integer,
?temperature: Float,
?text: OpenAI::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text,
?tools: ::Array[OpenAI::Models::Responses::tool],
?top_p: Float
}
|