Class: Anthropic::Models::ImageTransformationsParam

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

Defined Under Namespace

Modules: OversizedImage

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(oversized_image: nil) ⇒ Object

Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

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

Parameters:



# File 'lib/anthropic/models/image_transformations_param.rb', line 17

Instance Attribute Details

#oversized_imageSymbol, ...

What the server does when this image exceeds the model's maximum image size. "downsize" (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. "error" instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.



15
# File 'lib/anthropic/models/image_transformations_param.rb', line 15

optional :oversized_image, enum: -> { Anthropic::ImageTransformationsParam::OversizedImage }

Instance Method Details

#to_hash{

Returns:

  • ({)


19
# File 'sig/anthropic/models/image_transformations_param.rbs', line 19

def to_hash: -> {