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

Overview

See Also:

Defined Under Namespace

Modules: ResponseFormat

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, 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, response_format: nil, seed: nil, temperature: nil, tools: nil, top_p: nil) ⇒ void

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



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


Instance Attribute Details

#max_completion_tokensInteger?

The maximum number of tokens in the generated output.



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

optional :max_completion_tokens, Integer

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



493
494
495
496
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 493

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

#seedInteger?

A seed value to initialize the randomness, during sampling.



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

optional :seed, Integer

#temperatureFloat?

A higher temperature increases randomness in the outputs.



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

optional :temperature, Float

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

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.



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

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

#top_pFloat?

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



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

optional :top_p, Float