struct
AI::OpenAI::OpenAIChatProviderOptions
- AI::OpenAI::OpenAIChatProviderOptions
- Struct
- Value
- Object
Overview
Provider-specific options for OpenAI chat language models.
These options can be passed via provider_options["openai"] in the
language model call options.
Included Modules
- JSON::Serializable
Defined in:
ai/openai/chat/openai_chat_options.crConstructors
- .new(pull : JSON::PullParser)
- .new(logit_bias : Hash(String, Int32) | Nil = nil, logprobs : Bool | Int32 | Nil = nil, parallel_tool_calls : Bool | Nil = nil, user : String | Nil = nil, reasoning_effort : String | Nil = nil, max_completion_tokens : Int32 | Nil = nil, store : Bool | Nil = nil, metadata : Hash(String, String) | Nil = nil, prediction : Hash(String, JSON::Any) | Nil = nil, service_tier : String | Nil = nil, strict_json_schema : Bool | Nil = nil, text_verbosity : String | Nil = nil, prompt_cache_key : String | Nil = nil, prompt_cache_retention : String | Nil = nil, safety_identifier : String | Nil = nil, system_message_mode : String | Nil = nil, force_reasoning : Bool | Nil = nil)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
Instance Method Summary
-
#force_reasoning : Bool | Nil
Force treating this model as a reasoning model.
-
#logit_bias : Hash(String, Int32) | Nil
Modify the likelihood of specified tokens appearing in the completion.
-
#logprobs : Bool | Int32 | Nil
Return the log probabilities of the tokens.
-
#max_completion_tokens : Int32 | Nil
Maximum number of completion tokens to generate.
-
#metadata : Hash(String, String) | Nil
Metadata to associate with the request.
-
#parallel_tool_calls : Bool | Nil
Whether to enable parallel function calling during tool use.
-
#prediction : Hash(String, JSON::Any) | Nil
Parameters for prediction mode.
-
#prompt_cache_key : String | Nil
A cache key for prompt caching.
-
#prompt_cache_retention : String | Nil
The retention policy for the prompt cache.
-
#reasoning_effort : String | Nil
Reasoning effort for reasoning models.
-
#safety_identifier : String | Nil
A stable identifier used to help detect users violating usage policies.
-
#service_tier : String | Nil
Service tier for the request.
-
#store : Bool | Nil
Whether to enable persistence in responses API.
-
#strict_json_schema : Bool | Nil
Whether to use strict JSON schema validation.
-
#system_message_mode : String | Nil
Override the system message mode for this model.
-
#text_verbosity : String | Nil
Controls the verbosity of the model's responses.
-
#user : String | Nil
A unique identifier representing your end-user.
Constructor Detail
Instance Method Detail
Modify the likelihood of specified tokens appearing in the completion. Maps token IDs to bias values from -100 to 100.
Return the log probabilities of the tokens. true = return logprobs, number = return top n logprobs.
The retention policy for the prompt cache. Valid values: "in_memory", "24h"
Reasoning effort for reasoning models. Valid values: "none", "minimal", "low", "medium", "high", "xhigh"
A stable identifier used to help detect users violating usage policies.
Service tier for the request. Valid values: "auto", "flex", "priority", "default"
Override the system message mode for this model. Valid values: "system", "developer", "remove"
Controls the verbosity of the model's responses. Valid values: "low", "medium", "high"