Class: Anthropic::Models::ImageDimensionsTooLargeErrorDetails

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/image_dimensions_too_large_error_details.rb,
sig/anthropic/models/image_dimensions_too_large_error_details.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #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(max_side_length_pixels:, paths:, error_code: :image_dimensions_too_large) ⇒ ImageDimensionsTooLargeErrorDetails

The longest side of one or more images in the request exceeds the image size limit. Scale each image in paths so that neither side exceeds max_side_length_pixels, or remove it, then retry.

Some parameter documentations has been truncated, see Anthropic::Models::ImageDimensionsTooLargeErrorDetails for more details.

Parameters:

  • max_side_length_pixels (Integer) —

    The limit the images exceeded: the largest width or height, in pixels, that an i

  • paths (Array<String>) —

    The position of every image over the limit, in the order you sent them, nested b

  • error_code (Symbol, :image_dimensions_too_large) (defaults to: :image_dimensions_too_large)
  • max_side_length_pixels: (Integer)
  • paths: (::Array[String])
  • error_code: (:image_dimensions_too_large) (defaults to: :image_dimensions_too_large)


# File 'lib/anthropic/models/image_dimensions_too_large_error_details.rb', line 26

Instance Attribute Details

#error_code ⇒ Symbol, :image_dimensions_too_large

Parameters:

  • value (:image_dimensions_too_large)

Returns:

  • (Symbol, :image_dimensions_too_large)


9
# File 'lib/anthropic/models/image_dimensions_too_large_error_details.rb', line 9

required :error_code, const: :image_dimensions_too_large

#max_side_length_pixels ⇒ Integer

The limit the images exceeded: the largest width or height, in pixels, that an image on this request may have.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


16
# File 'lib/anthropic/models/image_dimensions_too_large_error_details.rb', line 16

required :max_side_length_pixels, Integer

#paths ⇒ Array<String>

The position of every image over the limit, in the order you sent them, nested blocks included, such as messages.0.content.1, or messages.0.content.1.content.0 for an image in a tool_result block.

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


24
# File 'lib/anthropic/models/image_dimensions_too_large_error_details.rb', line 24

required :paths, Anthropic::Internal::Type::ArrayOf[String]

Instance Method Details

#to_hash ⇒ { error_code: :image_dimensions_too_large, max_side_length_pixels: Integer, paths: ::Array[String] }

Returns:

  • ({ error_code: :image_dimensions_too_large, max_side_length_pixels: Integer, paths: ::Array[String] })


23
24
25
26
27
# File 'sig/anthropic/models/image_dimensions_too_large_error_details.rbs', line 23

def to_hash: -> {
  error_code: :image_dimensions_too_large,
  max_side_length_pixels: Integer,
  paths: ::Array[String]
}