Class: OpenAI::Models::Model

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/model.rb

Overview

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, 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: , created: , owned_by: , object: :model) ⇒ Object

Describes an OpenAI model offering that can be used with the API.

Parameters:

  • id (String) (defaults to: )

    The model identifier, which can be referenced in the API endpoints.

  • created (Integer) (defaults to: )

    The Unix timestamp (in seconds) when the model was created.

  • owned_by (String) (defaults to: )

    The organization that owns the model.

  • object (Symbol, :model) (defaults to: :model)

    The object type, which is always “model”.



# File 'lib/openai/models/model.rb', line 31

Instance Attribute Details

#createdInteger

The Unix timestamp (in seconds) when the model was created.

Returns:

  • (Integer)


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

required :created, Integer

#idString

The model identifier, which can be referenced in the API endpoints.

Returns:

  • (String)


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

required :id, String

#objectSymbol, :model

The object type, which is always “model”.

Returns:

  • (Symbol, :model)


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

required :object, const: :model

#owned_byString

The organization that owns the model.

Returns:

  • (String)


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

required :owned_by, String