Class: OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/beta_response_output_item.rb,
sig/openai/models/beta/beta_response_output_item.rbs

Defined Under Namespace

Modules: Detail Classes: PromptCacheBreakpoint

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

Instance Method Summary collapse

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(detail:, file_id:, image_url:, prompt_cache_breakpoint: nil, type: :computer_screenshot) ⇒ ComputerScreenshot

Returns a new instance of ComputerScreenshot.

Parameters:

  • detail —

    The detail level of the screenshot image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

  • file_id —

    The identifier of an uploaded file that contains the screenshot.

  • image_url —

    The URL of the screenshot image.

  • prompt_cache_breakpoint (defaults to: nil) —

    Marks the exact end of a reusable prompt prefix. When ttl is omitted, the breakpoint inherits the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

  • type (defaults to: :computer_screenshot) —

    Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot.

  • detail: (OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::detail)
  • file_id: (String, nil)
  • image_url: (String, nil)
  • prompt_cache_breakpoint: (OpenAI::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint) (defaults to: nil)
  • type: (:computer_screenshot) (defaults to: :computer_screenshot)


# File 'lib/openai/models/beta/beta_response_output_item.rb', line 310

Instance Attribute Details

#detail ⇒ OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::detail

The detail level of the screenshot image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

Returns:

  • (OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::detail)


273
274
275
276
# File 'lib/openai/models/beta/beta_response_output_item.rb', line 273

required(
  :detail,
  enum: -> { OpenAI::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::Detail }
)

#file_id ⇒ String?

The identifier of an uploaded file that contains the screenshot.

Returns:

  • (String, nil)


282
# File 'lib/openai/models/beta/beta_response_output_item.rb', line 282

required :file_id, String, nil?: true

#image_url ⇒ String?

The URL of the screenshot image.

Returns:

  • (String, nil)


288
# File 'lib/openai/models/beta/beta_response_output_item.rb', line 288

required :image_url, String, nil?: true

#prompt_cache_breakpoint ⇒ OpenAI::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint?

Marks the exact end of a reusable prompt prefix. When ttl is omitted, the breakpoint inherits the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

Returns:

  • (OpenAI::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint, nil)


303
304
305
306
307
308
# File 'lib/openai/models/beta/beta_response_output_item.rb', line 303

optional(
  :prompt_cache_breakpoint,
  -> {
    OpenAI::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint
  }
)

#type ⇒ :computer_screenshot

Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot.

Returns:

  • (:computer_screenshot)


295
# File 'lib/openai/models/beta/beta_response_output_item.rb', line 295

required :type, const: :computer_screenshot

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/beta_response_output_item.rb', line 344

Instance Method Details

#to_hash ⇒ { detail: OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::detail, file_id: String?, image_url: String?, ?type: :computer_screenshot, ?prompt_cache_breakpoint: OpenAI::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint }

Returns:

  • ({ detail: OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::detail, file_id: String?, image_url: String?, ?type: :computer_screenshot, ?prompt_cache_breakpoint: OpenAI::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint })


227
228
229
230
231
232
233
# File 'sig/openai/models/beta/beta_response_output_item.rbs', line 227

def to_hash: -> {
  detail: OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::detail,
  file_id: String?,
  image_url: String?,
  ?type: :computer_screenshot,
  ?prompt_cache_breakpoint: OpenAI::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint
}