Class: OpenAI::Models::Conversations::ComputerScreenshotContent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/conversations/computer_screenshot_content.rb,
sig/openai/models/conversations/computer_screenshot_content.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_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, 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) ⇒ Object

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. The breakpoint inherits its TTL from 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.



# File 'lib/openai/models/conversations/computer_screenshot_content.rb', line 44

Instance Attribute Details

#detailOpenAI::Models::Conversations::ComputerScreenshotContent::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::Conversations::ComputerScreenshotContent::detail)


12
# File 'lib/openai/models/conversations/computer_screenshot_content.rb', line 12

required :detail, enum: -> { OpenAI::Conversations::ComputerScreenshotContent::Detail }

#file_idString?

The identifier of an uploaded file that contains the screenshot.

Returns:

  • (String, nil)


18
# File 'lib/openai/models/conversations/computer_screenshot_content.rb', line 18

required :file_id, String, nil?: true

#image_urlString?

The URL of the screenshot image.

Returns:

  • (String, nil)


24
# File 'lib/openai/models/conversations/computer_screenshot_content.rb', line 24

required :image_url, String, nil?: true

#prompt_cache_breakpointOpenAI::Conversations::ComputerScreenshotContent::PromptCacheBreakpoint?

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

Returns:

  • (OpenAI::Conversations::ComputerScreenshotContent::PromptCacheBreakpoint, nil)


39
40
41
42
# File 'lib/openai/models/conversations/computer_screenshot_content.rb', line 39

optional(
  :prompt_cache_breakpoint,
  -> { OpenAI::Conversations::ComputerScreenshotContent::PromptCacheBreakpoint }
)

#type:computer_screenshot

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

Returns:

  • (:computer_screenshot)


31
# File 'lib/openai/models/conversations/computer_screenshot_content.rb', line 31

required :type, const: :computer_screenshot

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/conversations/computer_screenshot_content.rb', line 78

Instance Method Details

#to_hash{

Returns:

  • ({)


62
# File 'sig/openai/models/conversations/computer_screenshot_content.rbs', line 62

def to_hash: -> {