class

OpenAI::CreateEvalCompletionsRunDataSourceSamplingParams

Inherits JSON::Serializable < Reference < Object

Constructors

new(reasoning_effort : ReasoningEffort | Nil = nil, temperature : Float64 | Nil = nil, max_completion_tokens : Int64 | Nil = nil, top_p : Float64 | Nil = nil, seed : Int64 | Nil = nil, response_format : CreateEvalCompletionsRunDataSourceSamplingParamsResponseFormat | Nil = nil, tools : Array(ChatCompletionTool) | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

max_completion_tokens

The maximum number of tokens in the generated output.

Source
max_completion_tokens=(max_completion_tokens : Int64 | Nil)

The maximum number of tokens in the generated output.

Source
reasoning_effort
Source
reasoning_effort=(reasoning_effort : ReasoningEffort | Nil)
Source
response_format

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.

Source
response_format=(response_format : CreateEvalCompletionsRunDataSourceSamplingParamsResponseFormat | Nil)

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.

Source
seed

A seed value to initialize the randomness, during sampling.

Source
seed=(seed : Int64 | Nil)

A seed value to initialize the randomness, during sampling.

Source
temperature

A higher temperature increases randomness in the outputs.

Source
temperature=(temperature : Float64 | Nil)

A higher temperature increases randomness in the outputs.

Source
tools

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.

Source
tools=(tools : Array(ChatCompletionTool) | Nil)

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.

Source
top_p

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

Source
top_p=(top_p : Float64 | Nil)

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

Source