struct
AI::OpenAI::Responses::ProviderOptions
- AI::OpenAI::Responses::ProviderOptions
- Struct
- Value
- Object
Overview
Provider options for Responses API
Included Modules
- JSON::Serializable
Defined in:
ai/openai/responses/openai_responses_options.crConstructors
- .new(pull : JSON::PullParser)
- .new(conversation : String | Nil = nil, include_values : Array(IncludeValue) | Nil = nil, instructions : String | Nil = nil, logprobs : LogprobsValue | Nil = nil, max_tool_calls : Int32 | Nil = nil, metadata : JSON::Any | Nil = nil, parallel_tool_calls : Bool | Nil = nil, previous_response_id : String | Nil = nil, prompt_cache_key : String | Nil = nil, prompt_cache_retention : PromptCacheRetention | Nil = nil, reasoning_effort : String | Nil = nil, reasoning_summary : String | Nil = nil, safety_identifier : String | Nil = nil, service_tier : ServiceTier | Nil = nil, store : Bool | Nil = nil, strict_json_schema : Bool | Nil = nil, text_verbosity : TextVerbosity | Nil = nil, truncation : Truncation | Nil = nil, user : String | Nil = nil, system_message_mode : SystemMessageMode | Nil = nil, force_reasoning : Bool | Nil = nil)
-
.new(conversation : String | Nil = nil, include_values : Array(IncludeValue) | Nil = nil, instructions : String | Nil = nil, logprobs : Bool | Int32 | Nil = nil, max_tool_calls : Int32 | Nil = nil, metadata : JSON::Any | Nil = nil, parallel_tool_calls : Bool | Nil = nil, previous_response_id : String | Nil = nil, prompt_cache_key : String | Nil = nil, prompt_cache_retention : PromptCacheRetention | Nil = nil, reasoning_effort : String | Nil = nil, reasoning_summary : String | Nil = nil, safety_identifier : String | Nil = nil, service_tier : ServiceTier | Nil = nil, store : Bool | Nil = nil, strict_json_schema : Bool | Nil = nil, text_verbosity : TextVerbosity | Nil = nil, truncation : Truncation | Nil = nil, user : String | Nil = nil, system_message_mode : SystemMessageMode | Nil = nil, force_reasoning : Bool | Nil = nil)
Convenience initializer with Bool or Int32 for logprobs
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
Instance Method Summary
-
#conversation : String | Nil
The ID of the OpenAI Conversation to continue.
-
#force_reasoning : Bool | Nil
Force treating this model as a reasoning model.
-
#include_values : Array(IncludeValue) | Nil
The set of extra fields to include in the response.
-
#instructions : String | Nil
Instructions for the model.
-
#logprobs : LogprobsValue | Nil
Return the log probabilities of the tokens.
-
#max_tool_calls : Int32 | Nil
The maximum number of total calls to built-in tools that can be processed in a response.
-
#metadata : JSON::Any | Nil
Additional metadata to store with the generation.
-
#parallel_tool_calls : Bool | Nil
Whether to use parallel tool calls.
-
#previous_response_id : String | Nil
The ID of the previous response.
-
#prompt_cache_key : String | Nil
Sets a cache key to tie this prompt to cached prefixes for better caching performance.
-
#prompt_cache_retention : PromptCacheRetention | Nil
The retention policy for the prompt cache.
-
#reasoning_effort : String | Nil
Reasoning effort for reasoning models.
-
#reasoning_summary : String | Nil
Controls reasoning summary output from the model.
-
#safety_identifier : String | Nil
The identifier for safety monitoring and tracking.
-
#service_tier : ServiceTier | Nil
Service tier for the request.
-
#store : Bool | Nil
Whether to store the generation.
-
#strict_json_schema : Bool | Nil
Whether to use strict JSON schema validation.
-
#system_message_mode : SystemMessageMode | Nil
Override the system message mode for this model.
-
#text_verbosity : TextVerbosity | Nil
Controls the verbosity of the model's responses.
-
#truncation : Truncation | Nil
Controls output truncation.
-
#user : String | Nil
A unique identifier representing your end-user.
Constructor Detail
Convenience initializer with Bool or Int32 for logprobs
Instance Method Detail
The ID of the OpenAI Conversation to continue.
You must create a conversation first via the OpenAI API.
Cannot be used in conjunction with previousResponseId.
The set of extra fields to include in the response. Example values: 'reasoning.encrypted_content', 'file_search_call.results', 'message.output_text.logprobs'.
Instructions for the model. They can be used to change the system or developer message when continuing a conversation.
Return the log probabilities of the tokens. Setting to true will return the log probabilities of the tokens that were generated. Setting to a number will return the log probabilities of the top n tokens.
The maximum number of total calls to built-in tools that can be processed in a response.
The ID of the previous response. You can use it to continue a conversation.
Sets a cache key to tie this prompt to cached prefixes for better caching performance.
The retention policy for the prompt cache.
Reasoning effort for reasoning models. Valid values: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'
Whether to use strict JSON schema validation. Defaults to true.
Override the system message mode for this model.