Class: OpenAI::Models::Beta::HostedEnvironmentFileID

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

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

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(id:, file_id:, path:, size_bytes:, type: :file_id) ⇒ HostedEnvironmentFileID

Returns a new instance of HostedEnvironmentFileID.

Parameters:

  • id —

    The session-scoped ID of the file in the execution environment.

  • file_id —

    The ID of the uploaded file.

  • path —

    The file's absolute path inside the environment.

  • size_bytes —

    The decoded file size in bytes.

  • type (defaults to: :file_id) —

    The type of the object. Always file_id.

  • id: (String)
  • file_id: (String)
  • path: (String)
  • size_bytes: (Integer)
  • type: (:file_id) (defaults to: :file_id)


# File 'lib/openai/models/beta/hosted_environment_file_id.rb', line 37

Instance Attribute Details

#file_id ⇒ String

The ID of the uploaded file.

Returns:

  • (String)


17
# File 'lib/openai/models/beta/hosted_environment_file_id.rb', line 17

required :file_id, String

#id ⇒ String

The session-scoped ID of the file in the execution environment.

Returns:

  • (String)


11
# File 'lib/openai/models/beta/hosted_environment_file_id.rb', line 11

required :id, String

#path ⇒ String

The file's absolute path inside the environment.

Returns:

  • (String)


23
# File 'lib/openai/models/beta/hosted_environment_file_id.rb', line 23

required :path, String

#size_bytes ⇒ Integer

The decoded file size in bytes.

Returns:

  • (Integer)


29
# File 'lib/openai/models/beta/hosted_environment_file_id.rb', line 29

required :size_bytes, Integer

#type ⇒ :file_id

The type of the object. Always file_id.

Returns:

  • (:file_id)


35
# File 'lib/openai/models/beta/hosted_environment_file_id.rb', line 35

required :type, const: :file_id

Instance Method Details

#to_hash ⇒ { id: String, file_id: String, path: String, size_bytes: Integer, ?type: :file_id }

Returns:

  • ({ id: String, file_id: String, path: String, size_bytes: Integer, ?type: :file_id })


47
48
49
50
51
52
53
# File 'sig/openai/models/beta/hosted_environment_file_id.rbs', line 47

def to_hash: -> {
  id: String,
  file_id: String,
  path: String,
  size_bytes: Integer,
  ?type: :file_id
}