struct AI::OpenAI::Responses::ProviderOptions

Overview

Provider options for Responses API

Included Modules

Defined in:

ai/openai/responses/openai_responses_options.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.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) #

[View source]
def self.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


[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]

Instance Method Detail

def conversation : String | Nil #

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.


[View source]
def force_reasoning : Bool | Nil #

Force treating this model as a reasoning model.


[View source]
def include_values : Array(IncludeValue) | Nil #

The set of extra fields to include in the response. Example values: 'reasoning.encrypted_content', 'file_search_call.results', 'message.output_text.logprobs'.


[View source]
def instructions : String | Nil #

Instructions for the model. They can be used to change the system or developer message when continuing a conversation.


[View source]
def logprobs : LogprobsValue | Nil #

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.


[View source]
def max_tool_calls : Int32 | Nil #

The maximum number of total calls to built-in tools that can be processed in a response.


[View source]
def metadata : JSON::Any | Nil #

Additional metadata to store with the generation.


[View source]
def parallel_tool_calls : Bool | Nil #

Whether to use parallel tool calls. Defaults to true.


[View source]
def previous_response_id : String | Nil #

The ID of the previous response. You can use it to continue a conversation.


[View source]
def prompt_cache_key : String | Nil #

Sets a cache key to tie this prompt to cached prefixes for better caching performance.


[View source]
def prompt_cache_retention : PromptCacheRetention | Nil #

The retention policy for the prompt cache.


[View source]
def reasoning_effort : String | Nil #

Reasoning effort for reasoning models. Valid values: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'


[View source]
def reasoning_summary : String | Nil #

Controls reasoning summary output from the model.


[View source]
def safety_identifier : String | Nil #

The identifier for safety monitoring and tracking.


[View source]
def service_tier : ServiceTier | Nil #

Service tier for the request.


[View source]
def store : Bool | Nil #

Whether to store the generation. Defaults to true.


[View source]
def strict_json_schema : Bool | Nil #

Whether to use strict JSON schema validation. Defaults to true.


[View source]
def system_message_mode : SystemMessageMode | Nil #

Override the system message mode for this model.


[View source]
def text_verbosity : TextVerbosity | Nil #

Controls the verbosity of the model's responses.


[View source]
def truncation : Truncation | Nil #

Controls output truncation.


[View source]
def user : String | Nil #

A unique identifier representing your end-user.


[View source]