Class: Carbon::TextEmbeddingGenerators

Inherits:
Object
  • Object
show all
Defined in:
lib/carbon_ruby_sdk/models/text_embedding_generators.rb

Constant Summary collapse

OPENAI =
"OPENAI".freeze
AZURE_OPENAI =
"AZURE_OPENAI".freeze
COHERE_MULTILINGUAL_V3 =
"COHERE_MULTILINGUAL_V3".freeze
OPENAI_ADA_LARGE_256 =
"OPENAI_ADA_LARGE_256".freeze
OPENAI_ADA_LARGE_1024 =
"OPENAI_ADA_LARGE_1024".freeze
OPENAI_ADA_LARGE_3072 =
"OPENAI_ADA_LARGE_3072".freeze
OPENAI_ADA_SMALL_512 =
"OPENAI_ADA_SMALL_512".freeze
OPENAI_ADA_SMALL_1536 =
"OPENAI_ADA_SMALL_1536".freeze
AZURE_ADA_LARGE_256 =
"AZURE_ADA_LARGE_256".freeze
AZURE_ADA_LARGE_1024 =
"AZURE_ADA_LARGE_1024".freeze
AZURE_ADA_LARGE_3072 =
"AZURE_ADA_LARGE_3072".freeze
AZURE_ADA_SMALL_512 =
"AZURE_ADA_SMALL_512".freeze
AZURE_ADA_SMALL_1536 =
"AZURE_ADA_SMALL_1536".freeze
SOLAR_1_MINI =
"SOLAR_1_MINI".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



29
30
31
# File 'lib/carbon_ruby_sdk/models/text_embedding_generators.rb', line 29

def self.all_vars
  @all_vars ||= [OPENAI, AZURE_OPENAI, COHERE_MULTILINGUAL_V3, OPENAI_ADA_LARGE_256, OPENAI_ADA_LARGE_1024, OPENAI_ADA_LARGE_3072, OPENAI_ADA_SMALL_512, OPENAI_ADA_SMALL_1536, AZURE_ADA_LARGE_256, AZURE_ADA_LARGE_1024, AZURE_ADA_LARGE_3072, AZURE_ADA_SMALL_512, AZURE_ADA_SMALL_1536, SOLAR_1_MINI].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



36
37
38
# File 'lib/carbon_ruby_sdk/models/text_embedding_generators.rb', line 36

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



43
44
45
46
# File 'lib/carbon_ruby_sdk/models/text_embedding_generators.rb', line 43

def build_from_hash(value)
  return value if TextEmbeddingGenerators.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #TextEmbeddingGenerators"
end