Class: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::SamplingParams

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

Overview

See Also:

  • OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource#sampling_params

Defined Under Namespace

Modules: ResponseFormat

Constant Summary collapse

OpenAI =

Returns:

  • (:ResponseFormatText)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #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, response_format: nil, seed: nil, temperature: nil, tools: nil, top_p: nil) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::SamplingParams for more details.

Parameters:

  • max_completion_tokens (Integer) (defaults to: nil)

    The maximum number of tokens in the generated output.

  • reasoning_effort (Symbol, OpenAI::Models::ReasoningEffort, nil) (defaults to: nil)

    Constrains effort on reasoning for reasoning models. Currently supported

  • response_format (OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::Models::ResponseFormatJSONObject) (defaults to: nil)

    An object specifying the format that the model must output.

  • seed (Integer) (defaults to: nil)

    A seed value to initialize the randomness, during sampling.

  • temperature (Float) (defaults to: nil)

    A higher temperature increases randomness in the outputs.

  • tools (Array<OpenAI::Models::Chat::ChatCompletionFunctionTool>) (defaults to: nil)

    A list of tools the model may call. Currently, only functions are supported as a

  • top_p (Float) (defaults to: nil)

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



# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 514

Instance Attribute Details

#max_completion_tokensInteger?

The maximum number of tokens in the generated output.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


459
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 459

optional :max_completion_tokens, Integer

#reasoning_effortSymbol, ...

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.

Parameters:

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

Returns:



470
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 470

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

#response_formatOpenAI::Models::ResponseFormatText, ...

An object specifying the format that the model must output.

Setting to { "type": "json_schema", "json_schema": {...} } enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.

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.



485
486
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 485

optional :response_format,
union: -> { OpenAI::Evals::CreateEvalCompletionsRunDataSource::SamplingParams::ResponseFormat }

#seedInteger?

A seed value to initialize the randomness, during sampling.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


492
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 492

optional :seed, Integer

#temperatureFloat?

A higher temperature increases randomness in the outputs.

Parameters:

  • (Float)

Returns:

  • (Float, nil)


498
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 498

optional :temperature, Float

#toolsArray<OpenAI::Models::Chat::ChatCompletionFunctionTool>?

A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.



506
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 506

optional :tools, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Chat::ChatCompletionFunctionTool] }

#top_pFloat?

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

Parameters:

  • (Float)

Returns:

  • (Float, nil)


512
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 512

optional :top_p, Float

Instance Method Details

#to_hash{

Returns:

  • ({)


383
# File 'sig/openai/models/evals/create_eval_completions_run_data_source.rbs', line 383

def to_hash: -> {