Class: OpenAI::Models::Beta::BetaResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::BetaResponse
- Defined in:
- lib/openai/models/beta/beta_response.rb,
sig/openai/models/beta/beta_response.rbs
Overview
Defined Under Namespace
Modules: Instructions, Model, PromptCacheDiagnostics, PromptCacheRetention, ServiceTier, ToolChoice, Truncation Classes: AccessPrograms, Conversation, Image, IncompleteDetails, InputTransformation, Moderation, PromptCacheOptions, Reasoning, ToolUsage
Instance Attribute Summary collapse
- #access_programs ⇒ OpenAI::Models::Beta::BetaResponse::AccessPrograms?
-
#background ⇒ Boolean?
Whether to run the model response in the background.
-
#completed_at ⇒ Float?
Unix timestamp (in seconds) of when this Response was completed.
-
#conversation ⇒ OpenAI::Beta::BetaResponse::Conversation?
The conversation that this response belonged to.
-
#created_at ⇒ Float
Unix timestamp (in seconds) of when this Response was created.
-
#error ⇒ OpenAI::Beta::BetaResponseError?
An error object returned when the model fails to generate a Response.
-
#id ⇒ String
Unique identifier for this Response.
- #image ⇒ OpenAI::Models::Beta::BetaResponse::Image?
-
#incomplete_details ⇒ OpenAI::Beta::BetaResponse::IncompleteDetails?
Details about why the response is incomplete.
-
#input_transformations ⇒ ::Array[OpenAI::Beta::BetaResponse::InputTransformation]?
Reasoning inputs withheld from the model, in input order.
-
#instructions ⇒ OpenAI::Models::Beta::BetaResponse::instructions?
A system (or developer) message inserted into the model's context.
-
#max_output_tokens ⇒ Integer?
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
-
#max_tool_calls ⇒ Integer?
The maximum number of total calls to built-in tools that can be processed in a response.
-
#metadata ⇒ ::Hash[Symbol, String]?
Set of 16 key-value pairs that can be attached to an object.
-
#model ⇒ OpenAI::Models::Beta::BetaResponse::model
Model ID used to generate the response, like
gpt-6.2-astra. -
#moderation ⇒ OpenAI::Beta::BetaResponse::Moderation?
Moderation results for the response input and output, if moderated completions were requested.
-
#object ⇒ :response
The object type of this resource - always set to
response. -
#output ⇒ ::Array[OpenAI::Models::Beta::beta_response_output_item]
An array of content items generated by the model.
-
#parallel_tool_calls ⇒ Boolean
Whether to allow the model to run tool calls in parallel.
-
#previous_response_id ⇒ String?
The unique ID of the previous response to the model.
-
#prompt ⇒ OpenAI::Beta::BetaResponsePrompt?
Reference to a prompt template and its variables.
-
#prompt_cache_diagnostics ⇒ OpenAI::Models::Beta::BetaResponse::prompt_cache_diagnostics?
Prompt cache diagnostics requested for this response.
-
#prompt_cache_key ⇒ String?
Used by OpenAI to cache responses for similar requests to optimize your cache hit rates.
-
#prompt_cache_options ⇒ OpenAI::Beta::BetaResponse::PromptCacheOptions?
The prompt-caching options that were applied to the response.
-
#prompt_cache_retention ⇒ OpenAI::Models::Beta::BetaResponse::prompt_cache_retention?
Deprecated.
-
#reasoning ⇒ OpenAI::Beta::BetaResponse::Reasoning?
Configuration options for reasoning models.
-
#safety_identifier ⇒ String?
A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
-
#service_tier ⇒ OpenAI::Models::Beta::BetaResponse::service_tier?
Specifies the processing type used for serving the request.
-
#status ⇒ OpenAI::Models::Beta::beta_response_status?
The status of the response generation.
-
#temperature ⇒ Float?
What sampling temperature to use, between 0 and 2.
-
#text ⇒ OpenAI::Beta::BetaResponseTextConfig?
Configuration options for a text response from the model.
-
#tool_choice ⇒ OpenAI::Models::Beta::BetaResponse::tool_choice
How the model should select which tool (or tools) to use when generating a response.
-
#tool_usage ⇒ OpenAI::Beta::BetaResponse::ToolUsage?
Usage reported by hosted tools, separate from base model
usage. -
#tools ⇒ ::Array[OpenAI::Models::Beta::beta_tool]
An array of tools the model may call while generating a response.
-
#top_logprobs ⇒ Integer?
An integer between 0 and 20 specifying the maximum number of most likely tokens to return at each token position, each with an associated log probability.
-
#top_p ⇒ Float?
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
-
#truncation ⇒ OpenAI::Models::Beta::BetaResponse::truncation?
The truncation strategy to use for the model response.
-
#usage ⇒ OpenAI::Beta::BetaResponseUsage?
Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.
-
#user ⇒ String?
This field is being replaced by
safety_identifierandprompt_cache_key.
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
- .values ⇒ Array<Symbol>
- .variants ⇒ Array(OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::CacheMiss, OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::CacheHit, OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::ComparisonResponseNotFound, OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::Unavailable)
Instance Method Summary collapse
-
#initialize(num_requests:) ⇒ BetaResponse
constructor
A new instance of BetaResponse.
- #to_hash ⇒ { id: String, access_programs: OpenAI::Beta::BetaResponse::AccessPrograms?, created_at: Float, error: OpenAI::Beta::BetaResponseError?, incomplete_details: OpenAI::Beta::BetaResponse::IncompleteDetails?, instructions: OpenAI::Models::Beta::BetaResponse::instructions?, metadata: ::Hash[Symbol, String]?, model: OpenAI::Models::Beta::BetaResponse::model, ?object: :response, output: ::Array[OpenAI::Models::Beta::beta_response_output_item], parallel_tool_calls: bool, temperature: Float?, tool_choice: OpenAI::Models::Beta::BetaResponse::tool_choice, tools: ::Array[OpenAI::Models::Beta::beta_tool], top_p: Float?, ?background: bool?, ?completed_at: Float?, ?conversation: OpenAI::Beta::BetaResponse::Conversation?, ?image: OpenAI::Beta::BetaResponse::Image, ?input_transformations: ::Array[OpenAI::Beta::BetaResponse::InputTransformation], ?max_output_tokens: Integer?, ?max_tool_calls: Integer?, ?moderation: OpenAI::Beta::BetaResponse::Moderation?, ?previous_response_id: String?, ?prompt: OpenAI::Beta::BetaResponsePrompt?, ?prompt_cache_diagnostics: OpenAI::Models::Beta::BetaResponse::prompt_cache_diagnostics, ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Beta::BetaResponse::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Beta::BetaResponse::prompt_cache_retention?, ?reasoning: OpenAI::Beta::BetaResponse::Reasoning?, ?safety_identifier: String?, ?service_tier: OpenAI::Models::Beta::BetaResponse::service_tier?, ?status: OpenAI::Models::Beta::beta_response_status, ?text: OpenAI::Beta::BetaResponseTextConfig, ?tool_usage: OpenAI::Beta::BetaResponse::ToolUsage, ?top_logprobs: Integer?, ?truncation: OpenAI::Models::Beta::BetaResponse::truncation?, ?usage: OpenAI::Beta::BetaResponseUsage, ?user: String }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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(num_requests:) ⇒ BetaResponse
Returns a new instance of BetaResponse.
|
|
# File 'lib/openai/models/beta/beta_response.rb', line 393
|
Instance Attribute Details
#access_programs ⇒ OpenAI::Models::Beta::BetaResponse::AccessPrograms?
19 |
# File 'lib/openai/models/beta/beta_response.rb', line 19 required :access_programs, -> { OpenAI::Beta::BetaResponse::AccessPrograms }, nil?: true |
#background ⇒ Boolean?
Whether to run the model response in the background. Learn more.
150 |
# File 'lib/openai/models/beta/beta_response.rb', line 150 optional :background, OpenAI::Internal::Type::Boolean, nil?: true |
#completed_at ⇒ Float?
Unix timestamp (in seconds) of when this Response was completed. Only present
when the status is completed.
157 |
# File 'lib/openai/models/beta/beta_response.rb', line 157 optional :completed_at, Float, nil?: true |
#conversation ⇒ OpenAI::Beta::BetaResponse::Conversation?
The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.
164 |
# File 'lib/openai/models/beta/beta_response.rb', line 164 optional :conversation, -> { OpenAI::Beta::BetaResponse::Conversation }, nil?: true |
#created_at ⇒ Float
Unix timestamp (in seconds) of when this Response was created.
25 |
# File 'lib/openai/models/beta/beta_response.rb', line 25 required :created_at, Float |
#error ⇒ OpenAI::Beta::BetaResponseError?
An error object returned when the model fails to generate a Response.
31 |
# File 'lib/openai/models/beta/beta_response.rb', line 31 required :error, -> { OpenAI::Beta::BetaResponseError }, nil?: true |
#id ⇒ String
Unique identifier for this Response.
14 |
# File 'lib/openai/models/beta/beta_response.rb', line 14 required :id, String |
#image ⇒ OpenAI::Models::Beta::BetaResponse::Image?
169 |
# File 'lib/openai/models/beta/beta_response.rb', line 169 optional :image, -> { OpenAI::Beta::BetaResponse::Image } |
#incomplete_details ⇒ OpenAI::Beta::BetaResponse::IncompleteDetails?
Details about why the response is incomplete.
37 |
# File 'lib/openai/models/beta/beta_response.rb', line 37 required :incomplete_details, -> { OpenAI::Beta::BetaResponse::IncompleteDetails }, nil?: true |
#input_transformations ⇒ ::Array[OpenAI::Beta::BetaResponse::InputTransformation]?
Reasoning inputs withheld from the model, in input order.
175 176 177 178 |
# File 'lib/openai/models/beta/beta_response.rb', line 175 optional( :input_transformations, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::BetaResponse::InputTransformation] } ) |
#instructions ⇒ OpenAI::Models::Beta::BetaResponse::instructions?
A system (or developer) message inserted into the model's context.
When using along with previous_response_id, the instructions from a previous
response will not be carried over to the next response. This makes it simple to
swap out system (or developer) messages in new responses.
47 |
# File 'lib/openai/models/beta/beta_response.rb', line 47 required :instructions, union: -> { OpenAI::Beta::BetaResponse::Instructions }, nil?: true |
#max_output_tokens ⇒ Integer?
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
186 |
# File 'lib/openai/models/beta/beta_response.rb', line 186 optional :max_output_tokens, Integer, nil?: true |
#max_tool_calls ⇒ Integer?
The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.
195 |
# File 'lib/openai/models/beta/beta_response.rb', line 195 optional :max_tool_calls, Integer, nil?: true |
#metadata ⇒ ::Hash[Symbol, String]?
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
57 |
# File 'lib/openai/models/beta/beta_response.rb', line 57 required :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true |
#model ⇒ OpenAI::Models::Beta::BetaResponse::model
Model ID used to generate the response, like gpt-6.2-astra. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model guide to browse and
compare available models.
67 |
# File 'lib/openai/models/beta/beta_response.rb', line 67 required :model, union: -> { OpenAI::Beta::BetaResponse::Model } |
#moderation ⇒ OpenAI::Beta::BetaResponse::Moderation?
Moderation results for the response input and output, if moderated completions were requested.
202 |
# File 'lib/openai/models/beta/beta_response.rb', line 202 optional :moderation, -> { OpenAI::Beta::BetaResponse::Moderation }, nil?: true |
#object ⇒ :response
The object type of this resource - always set to response.
73 |
# File 'lib/openai/models/beta/beta_response.rb', line 73 required :object, const: :response |
#output ⇒ ::Array[OpenAI::Models::Beta::beta_response_output_item]
An array of content items generated by the model.
- The length and order of items in the
outputarray is dependent on the model's response. - Rather than accessing the first item in the
outputarray and assuming it's anassistantmessage with the content generated by the model, you might consider using theoutput_textproperty where supported in SDKs.
85 |
# File 'lib/openai/models/beta/beta_response.rb', line 85 required :output, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::BetaResponseOutputItem] } |
#parallel_tool_calls ⇒ Boolean
Whether to allow the model to run tool calls in parallel.
91 |
# File 'lib/openai/models/beta/beta_response.rb', line 91 required :parallel_tool_calls, OpenAI::Internal::Type::Boolean |
#previous_response_id ⇒ String?
The unique ID of the previous response to the model. Use this to create
multi-turn conversations. Learn more about
conversation state.
Cannot be used in conjunction with conversation.
211 |
# File 'lib/openai/models/beta/beta_response.rb', line 211 optional :previous_response_id, String, nil?: true |
#prompt ⇒ OpenAI::Beta::BetaResponsePrompt?
Reference to a prompt template and its variables. Learn more.
218 |
# File 'lib/openai/models/beta/beta_response.rb', line 218 optional :prompt, -> { OpenAI::Beta::BetaResponsePrompt }, nil?: true |
#prompt_cache_diagnostics ⇒ OpenAI::Models::Beta::BetaResponse::prompt_cache_diagnostics?
Prompt cache diagnostics requested for this response.
224 |
# File 'lib/openai/models/beta/beta_response.rb', line 224 optional :prompt_cache_diagnostics, union: -> { OpenAI::Beta::BetaResponse::PromptCacheDiagnostics } |
#prompt_cache_key ⇒ String?
Used by OpenAI to cache responses for similar requests to optimize your cache
hit rates. Replaces the user field.
Learn more.
232 |
# File 'lib/openai/models/beta/beta_response.rb', line 232 optional :prompt_cache_key, String, nil?: true |
#prompt_cache_options ⇒ OpenAI::Beta::BetaResponse::PromptCacheOptions?
The prompt-caching options that were applied to the response. Supported for
gpt-5.6 and later models.
239 |
# File 'lib/openai/models/beta/beta_response.rb', line 239 optional :prompt_cache_options, -> { OpenAI::Beta::BetaResponse::PromptCacheOptions } |
#prompt_cache_retention ⇒ OpenAI::Models::Beta::BetaResponse::prompt_cache_retention?
Deprecated. Use prompt_cache_options.ttl instead.
The retention policy for the prompt cache. Set to 24h to enable extended
prompt caching, which keeps cached prefixes active for longer, up to a maximum
of 24 hours.
Learn more.
This field expresses a maximum retention policy, while
prompt_cache_options.ttl expresses a minimum cache lifetime. The two fields
are independent and do not interact. For gpt-5.5, gpt-5.5-pro, and future
models, only 24h is supported.
For older models that support both in_memory and 24h, the default depends on
your organization's data retention policy:
- Organizations without ZDR enabled default to
24h. - Organizations with ZDR enabled default to
in_memorywhenprompt_cache_retentionis not specified.
263 264 265 266 267 |
# File 'lib/openai/models/beta/beta_response.rb', line 263 optional( :prompt_cache_retention, enum: -> { OpenAI::Beta::BetaResponse::PromptCacheRetention }, nil?: true ) |
#reasoning ⇒ OpenAI::Beta::BetaResponse::Reasoning?
Configuration options for reasoning models.
274 |
# File 'lib/openai/models/beta/beta_response.rb', line 274 optional :reasoning, -> { OpenAI::Beta::BetaResponse::Reasoning }, nil?: true |
#safety_identifier ⇒ String?
A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with a maximum length of 128 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. Learn more.
285 |
# File 'lib/openai/models/beta/beta_response.rb', line 285 optional :safety_identifier, String, nil?: true |
#service_tier ⇒ OpenAI::Models::Beta::BetaResponse::service_tier?
Specifies the processing type used for serving the request.
- If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
- If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
- If set to 'flex', then the request will be processed with the Flex Processing service tier.
- To opt-in to
Fast mode at the
request level, include the
service_tier=fastorservice_tier=priorityparameter for Responses or Chat Completions. The response will showservice_tier=priorityregardless of if you specifyservice_tier=fastorpriorityin your request. - If set to 'ultrafast', then the request will be processed with the
access-controlled Ultrafast Processing service tier. This tier is currently
available for
gpt-5.6-sol; a response served through it will showservice_tier=ultrafast. - When not set, the default behavior is 'auto'.
When the service_tier parameter is set, the response body will include the
service_tier value based on the processing mode actually used to serve the
request. This response value may be different from the value set in the
parameter.
316 |
# File 'lib/openai/models/beta/beta_response.rb', line 316 optional :service_tier, enum: -> { OpenAI::Beta::BetaResponse::ServiceTier }, nil?: true |
#status ⇒ OpenAI::Models::Beta::beta_response_status?
The status of the response generation. One of completed, failed,
in_progress, cancelled, queued, or incomplete.
323 |
# File 'lib/openai/models/beta/beta_response.rb', line 323 optional :status, enum: -> { OpenAI::Beta::BetaResponseStatus } |
#temperature ⇒ Float?
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
make the output more random, while lower values like 0.2 will make it more
focused and deterministic. We generally recommend altering this or top_p but
not both.
100 |
# File 'lib/openai/models/beta/beta_response.rb', line 100 required :temperature, Float, nil?: true |
#text ⇒ OpenAI::Beta::BetaResponseTextConfig?
Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
333 |
# File 'lib/openai/models/beta/beta_response.rb', line 333 optional :text, -> { OpenAI::Beta::BetaResponseTextConfig } |
#tool_choice ⇒ OpenAI::Models::Beta::BetaResponse::tool_choice
How the model should select which tool (or tools) to use when generating a
response. See the tools parameter to see how to specify which tools the model
can call.
108 |
# File 'lib/openai/models/beta/beta_response.rb', line 108 required :tool_choice, union: -> { OpenAI::Beta::BetaResponse::ToolChoice } |
#tool_usage ⇒ OpenAI::Beta::BetaResponse::ToolUsage?
Usage reported by hosted tools, separate from base model usage. The field can
be omitted when tool usage is unavailable. When present, tool families with no
recorded usage have zero counts.
image_gen sums available token counts across image generation calls. Calls
with missing or incomplete usage records may be skipped. Output token details
and cached input counts can be omitted. An omitted cache count means cache usage
is unknown.
web_search.num_requests counts billable searches. Discounted searches and
actions such as opening a page are excluded. Use billing records to reconcile
final charges.
350 |
# File 'lib/openai/models/beta/beta_response.rb', line 350 optional :tool_usage, -> { OpenAI::Beta::BetaResponse::ToolUsage } |
#tools ⇒ ::Array[OpenAI::Models::Beta::beta_tool]
An array of tools the model may call while generating a response. You can
specify which tool to use by setting the tool_choice parameter.
We support the following categories of tools:
- Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools.
- MCP Tools: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about MCP Tools.
- Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about function calling. You can also use custom tools to call your own code.
133 |
# File 'lib/openai/models/beta/beta_response.rb', line 133 required :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::BetaTool] } |
#top_logprobs ⇒ Integer?
An integer between 0 and 20 specifying the maximum number of most likely tokens to return at each token position, each with an associated log probability. In some cases, the number of returned tokens may be fewer than requested.
358 |
# File 'lib/openai/models/beta/beta_response.rb', line 358 optional :top_logprobs, Integer, nil?: true |
#top_p ⇒ Float?
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or temperature but not both.
143 |
# File 'lib/openai/models/beta/beta_response.rb', line 143 required :top_p, Float, nil?: true |
#truncation ⇒ OpenAI::Models::Beta::BetaResponse::truncation?
The truncation strategy to use for the model response.
auto: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. On some models, trimming can begin earlier because the API subtracts the model's maximum output allowance from its input limit, even if you set a lowermax_output_tokens.disabled(default): If the input size will exceed the context window size for a model, the request will fail with a 400 error.
372 |
# File 'lib/openai/models/beta/beta_response.rb', line 372 optional :truncation, enum: -> { OpenAI::Beta::BetaResponse::Truncation }, nil?: true |
#usage ⇒ OpenAI::Beta::BetaResponseUsage?
Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.
379 |
# File 'lib/openai/models/beta/beta_response.rb', line 379 optional :usage, -> { OpenAI::Beta::BetaResponseUsage } |
#user ⇒ String?
This field is being replaced by safety_identifier and prompt_cache_key. Use
prompt_cache_key instead to maintain caching optimizations. A stable
identifier for your end-users. Used to boost cache hit rates by better bucketing
similar requests and to help OpenAI detect and prevent abuse.
Learn more.
391 |
# File 'lib/openai/models/beta/beta_response.rb', line 391 optional :user, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/beta/beta_response.rb', line 671
|
.variants ⇒ Array(OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::CacheMiss, OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::CacheHit, OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::ComparisonResponseNotFound, OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::Unavailable)
|
|
# File 'lib/openai/models/beta/beta_response.rb', line 1413
|
Instance Method Details
#to_hash ⇒ { id: String, access_programs: OpenAI::Beta::BetaResponse::AccessPrograms?, created_at: Float, error: OpenAI::Beta::BetaResponseError?, incomplete_details: OpenAI::Beta::BetaResponse::IncompleteDetails?, instructions: OpenAI::Models::Beta::BetaResponse::instructions?, metadata: ::Hash[Symbol, String]?, model: OpenAI::Models::Beta::BetaResponse::model, ?object: :response, output: ::Array[OpenAI::Models::Beta::beta_response_output_item], parallel_tool_calls: bool, temperature: Float?, tool_choice: OpenAI::Models::Beta::BetaResponse::tool_choice, tools: ::Array[OpenAI::Models::Beta::beta_tool], top_p: Float?, ?background: bool?, ?completed_at: Float?, ?conversation: OpenAI::Beta::BetaResponse::Conversation?, ?image: OpenAI::Beta::BetaResponse::Image, ?input_transformations: ::Array[OpenAI::Beta::BetaResponse::InputTransformation], ?max_output_tokens: Integer?, ?max_tool_calls: Integer?, ?moderation: OpenAI::Beta::BetaResponse::Moderation?, ?previous_response_id: String?, ?prompt: OpenAI::Beta::BetaResponsePrompt?, ?prompt_cache_diagnostics: OpenAI::Models::Beta::BetaResponse::prompt_cache_diagnostics, ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Beta::BetaResponse::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Beta::BetaResponse::prompt_cache_retention?, ?reasoning: OpenAI::Beta::BetaResponse::Reasoning?, ?safety_identifier: String?, ?service_tier: OpenAI::Models::Beta::BetaResponse::service_tier?, ?status: OpenAI::Models::Beta::beta_response_status, ?text: OpenAI::Beta::BetaResponseTextConfig, ?tool_usage: OpenAI::Beta::BetaResponse::ToolUsage, ?top_logprobs: Integer?, ?truncation: OpenAI::Models::Beta::BetaResponse::truncation?, ?usage: OpenAI::Beta::BetaResponseUsage, ?user: String }
625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 |
# File 'sig/openai/models/beta/beta_response.rbs', line 625
def to_hash: -> {
id: String,
access_programs: OpenAI::Beta::BetaResponse::AccessPrograms?,
created_at: Float,
error: OpenAI::Beta::BetaResponseError?,
incomplete_details: OpenAI::Beta::BetaResponse::IncompleteDetails?,
instructions: OpenAI::Models::Beta::BetaResponse::instructions?,
metadata: ::Hash[Symbol, String]?,
model: OpenAI::Models::Beta::BetaResponse::model,
?object: :response,
output: ::Array[OpenAI::Models::Beta::beta_response_output_item],
parallel_tool_calls: bool,
temperature: Float?,
tool_choice: OpenAI::Models::Beta::BetaResponse::tool_choice,
tools: ::Array[OpenAI::Models::Beta::beta_tool],
top_p: Float?,
?background: bool?,
?completed_at: Float?,
?conversation: OpenAI::Beta::BetaResponse::Conversation?,
?image: OpenAI::Beta::BetaResponse::Image,
?input_transformations: ::Array[OpenAI::Beta::BetaResponse::InputTransformation],
?max_output_tokens: Integer?,
?max_tool_calls: Integer?,
?moderation: OpenAI::Beta::BetaResponse::Moderation?,
?previous_response_id: String?,
?prompt: OpenAI::Beta::BetaResponsePrompt?,
?prompt_cache_diagnostics: OpenAI::Models::Beta::BetaResponse::prompt_cache_diagnostics,
?prompt_cache_key: String?,
?prompt_cache_options: OpenAI::Beta::BetaResponse::PromptCacheOptions,
?prompt_cache_retention: OpenAI::Models::Beta::BetaResponse::prompt_cache_retention?,
?reasoning: OpenAI::Beta::BetaResponse::Reasoning?,
?safety_identifier: String?,
?service_tier: OpenAI::Models::Beta::BetaResponse::service_tier?,
?status: OpenAI::Models::Beta::beta_response_status,
?text: OpenAI::Beta::BetaResponseTextConfig,
?tool_usage: OpenAI::Beta::BetaResponse::ToolUsage,
?top_logprobs: Integer?,
?truncation: OpenAI::Models::Beta::BetaResponse::truncation?,
?usage: OpenAI::Beta::BetaResponseUsage,
?user: String
}
|