Class: OpenAI::Models::ContainerCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/openai/models/container_create_params.rb,
sig/openai/models/container_create_params.rbs

Overview

See Also:

  • OpenAI::Resources::Containers#create

Defined Under Namespace

Modules: MemoryLimit, NetworkPolicy, Skill Classes: ExpiresAfter

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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 ⇒ ContainerCreateParams

Returns a new instance of ContainerCreateParams.

Parameters:

  • name —

    Name of the container to create.

  • expires_after —

    Container expiration time in seconds relative to the 'anchor' time.

  • file_ids —

    IDs of files to copy to the container.

  • memory_limit —

    Optional memory limit for the container. Defaults to "1g".

  • network_policy —

    Network access policy for the container.

  • skills —

    An optional list of skills referenced by id or inline data.

  • name: (String)
  • expires_after: (OpenAI::ContainerCreateParams::ExpiresAfter)
  • file_ids: (::Array[String])
  • memory_limit: (OpenAI::Models::ContainerCreateParams::memory_limit)
  • network_policy: (OpenAI::Models::ContainerCreateParams::network_policy)
  • skills: (::Array[OpenAI::Models::ContainerCreateParams::skill])
  • request_options: (OpenAI::request_opts)


71
72
73
74
75
76
77
78
79
# File 'sig/openai/models/container_create_params.rbs', line 71

def initialize: (
  name: String,
  ?expires_after: OpenAI::ContainerCreateParams::ExpiresAfter,
  ?file_ids: ::Array[String],
  ?memory_limit: OpenAI::Models::ContainerCreateParams::memory_limit,
  ?network_policy: OpenAI::Models::ContainerCreateParams::network_policy,
  ?skills: ::Array[OpenAI::Models::ContainerCreateParams::skill],
  ?request_options: OpenAI::request_opts
) -> void

Instance Attribute Details

#expires_after ⇒ OpenAI::ContainerCreateParams::ExpiresAfter?

Container expiration time in seconds relative to the 'anchor' time.

Returns:

  • (OpenAI::ContainerCreateParams::ExpiresAfter, nil)


20
# File 'lib/openai/models/container_create_params.rb', line 20

optional :expires_after, -> { OpenAI::ContainerCreateParams::ExpiresAfter }

#file_ids ⇒ ::Array[String]?

IDs of files to copy to the container.

Returns:

  • (::Array[String], nil)


26
# File 'lib/openai/models/container_create_params.rb', line 26

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

#memory_limit ⇒ OpenAI::Models::ContainerCreateParams::memory_limit?

Optional memory limit for the container. Defaults to "1g".

Returns:

  • (OpenAI::Models::ContainerCreateParams::memory_limit, nil)


32
# File 'lib/openai/models/container_create_params.rb', line 32

optional :memory_limit, enum: -> { OpenAI::ContainerCreateParams::MemoryLimit }

#name ⇒ String

Name of the container to create.

Returns:

  • (String)


14
# File 'lib/openai/models/container_create_params.rb', line 14

required :name, String

#network_policy ⇒ OpenAI::Models::ContainerCreateParams::network_policy?

Network access policy for the container.

Returns:

  • (OpenAI::Models::ContainerCreateParams::network_policy, nil)


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

optional :network_policy, union: -> { OpenAI::ContainerCreateParams::NetworkPolicy }

#skills ⇒ ::Array[OpenAI::Models::ContainerCreateParams::skill]?

An optional list of skills referenced by id or inline data.

Returns:

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


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

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

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/container_create_params.rb', line 98

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



# File 'lib/openai/models/container_create_params.rb', line 126

Instance Method Details

#to_hash ⇒ { name: String, ?expires_after: OpenAI::ContainerCreateParams::ExpiresAfter, ?file_ids: ::Array[String], ?memory_limit: OpenAI::Models::ContainerCreateParams::memory_limit, ?network_policy: OpenAI::Models::ContainerCreateParams::network_policy, ?skills: ::Array[OpenAI::Models::ContainerCreateParams::skill], ?request_options: OpenAI::RequestOptions }

Returns:

  • ({ name: String, ?expires_after: OpenAI::ContainerCreateParams::ExpiresAfter, ?file_ids: ::Array[String], ?memory_limit: OpenAI::Models::ContainerCreateParams::memory_limit, ?network_policy: OpenAI::Models::ContainerCreateParams::network_policy, ?skills: ::Array[OpenAI::Models::ContainerCreateParams::skill], ?request_options: OpenAI::RequestOptions })


81
82
83
84
85
86
87
88
89
# File 'sig/openai/models/container_create_params.rbs', line 81

def to_hash: -> {
  name: String,
  ?expires_after: OpenAI::ContainerCreateParams::ExpiresAfter,
  ?file_ids: ::Array[String],
  ?memory_limit: OpenAI::Models::ContainerCreateParams::memory_limit,
  ?network_policy: OpenAI::Models::ContainerCreateParams::network_policy,
  ?skills: ::Array[OpenAI::Models::ContainerCreateParams::skill],
  ?request_options: OpenAI::RequestOptions
}