Class: OpenAI::Models::Responses::ContainerAuto

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

Defined Under Namespace

Modules: MemoryLimit, NetworkPolicy, Skill

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(file_ids: nil, memory_limit: nil, network_policy: nil, skills: nil, type: :container_auto) ⇒ ContainerAuto

Returns a new instance of ContainerAuto.

Parameters:

  • file_ids (defaults to: nil) —

    An optional list of uploaded files to make available to your code.

  • memory_limit (defaults to: nil) —

    The memory limit for the container.

  • network_policy (defaults to: nil) —

    Network access policy for the container.

  • skills (defaults to: nil) —

    An optional list of skills referenced by id or inline data. Across all inline skills in this list, decoded ZIP data must total at most 50 MiB and Base64 text must total at most 70,254,592 characters, including line breaks. Skill references do not count toward these limits.

  • type (defaults to: :container_auto) —

    Automatically creates a container for this request

  • file_ids: (::Array[String]) (defaults to: nil)
  • memory_limit: (OpenAI::Models::Responses::ContainerAuto::memory_limit, nil) (defaults to: nil)
  • network_policy: (OpenAI::Models::Responses::ContainerAuto::network_policy) (defaults to: nil)
  • skills: (::Array[OpenAI::Models::Responses::ContainerAuto::skill]) (defaults to: nil)
  • type: (:container_auto) (defaults to: :container_auto)


# File 'lib/openai/models/responses/container_auto.rb', line 40

Instance Attribute Details

#file_ids ⇒ ::Array[String]?

An optional list of uploaded files to make available to your code.

Returns:

  • (::Array[String], nil)


17
# File 'lib/openai/models/responses/container_auto.rb', line 17

optional :file_ids, OpenAI::Internal::Type::ArrayOf[String]

#memory_limit ⇒ OpenAI::Models::Responses::ContainerAuto::memory_limit?

The memory limit for the container.

Returns:

  • (OpenAI::Models::Responses::ContainerAuto::memory_limit, nil)


23
# File 'lib/openai/models/responses/container_auto.rb', line 23

optional :memory_limit, enum: -> { OpenAI::Responses::ContainerAuto::MemoryLimit }, nil?: true

#network_policy ⇒ OpenAI::Models::Responses::ContainerAuto::network_policy?

Network access policy for the container.

Returns:

  • (OpenAI::Models::Responses::ContainerAuto::network_policy, nil)


29
# File 'lib/openai/models/responses/container_auto.rb', line 29

optional :network_policy, union: -> { OpenAI::Responses::ContainerAuto::NetworkPolicy }

#skills ⇒ ::Array[OpenAI::Models::Responses::ContainerAuto::skill]?

An optional list of skills referenced by id or inline data. Across all inline skills in this list, decoded ZIP data must total at most 50 MiB and Base64 text must total at most 70,254,592 characters, including line breaks. Skill references do not count toward these limits.

Returns:

  • (::Array[OpenAI::Models::Responses::ContainerAuto::skill], nil)


38
# File 'lib/openai/models/responses/container_auto.rb', line 38

optional :skills, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::ContainerAuto::Skill] }

#type ⇒ :container_auto

Automatically creates a container for this request

Returns:

  • (:container_auto)


11
# File 'lib/openai/models/responses/container_auto.rb', line 11

required :type, const: :container_auto

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/responses/container_auto.rb', line 70

.variants ⇒ Array(OpenAI::Models::Responses::ContainerNetworkPolicyDisabled, OpenAI::Models::Responses::ContainerNetworkPolicyAllowlist)



# File 'lib/openai/models/responses/container_auto.rb', line 86

Instance Method Details

#to_hash ⇒ { ?type: :container_auto, ?file_ids: ::Array[String], ?memory_limit: OpenAI::Models::Responses::ContainerAuto::memory_limit?, ?network_policy: OpenAI::Models::Responses::ContainerAuto::network_policy, ?skills: ::Array[OpenAI::Models::Responses::ContainerAuto::skill] }

Returns:

  • ({ ?type: :container_auto, ?file_ids: ::Array[String], ?memory_limit: OpenAI::Models::Responses::ContainerAuto::memory_limit?, ?network_policy: OpenAI::Models::Responses::ContainerAuto::network_policy, ?skills: ::Array[OpenAI::Models::Responses::ContainerAuto::skill] })


69
70
71
72
73
74
75
# File 'sig/openai/models/responses/container_auto.rbs', line 69

def to_hash: -> {
  ?type: :container_auto,
  ?file_ids: ::Array[String],
  ?memory_limit: OpenAI::Models::Responses::ContainerAuto::memory_limit?,
  ?network_policy: OpenAI::Models::Responses::ContainerAuto::network_policy,
  ?skills: ::Array[OpenAI::Models::Responses::ContainerAuto::skill]
}