Class: OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/openai/models/evals/run_create_params.rb,
sig/openai/models/evals/run_create_params.rbs

Overview

See Also:

  • OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource#sampling_params

Defined Under Namespace

Classes: Text

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

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_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, 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) ⇒ Object

Parameters:

  • max_completion_tokens (defaults to: nil)

    The maximum number of tokens in the generated output.

  • reasoning_effort (defaults to: nil)

    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.

  • seed (defaults to: nil)

    A seed value to initialize the randomness, during sampling.

  • temperature (defaults to: nil)

    A higher temperature increases randomness in the outputs.

  • text (defaults to: nil)

    Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:

  • tools (defaults to: nil)

    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.
  • top_p (defaults to: nil)

    An alternative to temperature for nucleus sampling; 1.0 includes all tokens.



# File 'lib/openai/models/evals/run_create_params.rb', line 746

Instance Attribute Details

#max_completion_tokensInteger?

The maximum number of tokens in the generated output.

Returns:

  • (Integer, nil)


680
# File 'lib/openai/models/evals/run_create_params.rb', line 680

optional :max_completion_tokens, Integer

#reasoning_effortOpenAI::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.

Returns:

  • (OpenAI::Models::reasoning_effort, nil)


691
# File 'lib/openai/models/evals/run_create_params.rb', line 691

optional :reasoning_effort, enum: -> { OpenAI::ReasoningEffort }, nil?: true

#seedInteger?

A seed value to initialize the randomness, during sampling.

Returns:

  • (Integer, nil)


697
# File 'lib/openai/models/evals/run_create_params.rb', line 697

optional :seed, Integer

#temperatureFloat?

A higher temperature increases randomness in the outputs.

Returns:

  • (Float, nil)


703
# File 'lib/openai/models/evals/run_create_params.rb', line 703

optional :temperature, Float

#textOpenAI::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:

Returns:

  • (OpenAI::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text, nil)


713
714
715
716
717
718
# File 'lib/openai/models/evals/run_create_params.rb', line 713

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.

Returns:

  • (::Array[OpenAI::Models::Responses::tool], nil)


738
# File 'lib/openai/models/evals/run_create_params.rb', line 738

optional :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::Tool] }

#top_pFloat?

An alternative to temperature for nucleus sampling; 1.0 includes all tokens.

Returns:

  • (Float, nil)


744
# File 'lib/openai/models/evals/run_create_params.rb', line 744

optional :top_p, Float

Instance Method Details

#to_hash{

Returns:

  • ({)


729
# File 'sig/openai/models/evals/run_create_params.rbs', line 729

def to_hash: -> {