Class: Rafflesia::FoundryEmbeddingUsage

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/foundry/foundry_embedding_usage.rb

Constant Summary collapse

HASH_ATTRS =
{
  input_count: :input_count,
  token_count: :token_count
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoundryEmbeddingUsage

Returns a new instance of FoundryEmbeddingUsage.



17
18
19
20
21
22
# File 'lib/rafflesia/foundry/foundry_embedding_usage.rb', line 17

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @input_count = hash[:input_count]
  @token_count = hash[:token_count]
end

Instance Attribute Details

#input_countObject

Returns the value of attribute input_count.



13
14
15
# File 'lib/rafflesia/foundry/foundry_embedding_usage.rb', line 13

def input_count
  @input_count
end

#token_countObject

Returns the value of attribute token_count.



13
14
15
# File 'lib/rafflesia/foundry/foundry_embedding_usage.rb', line 13

def token_count
  @token_count
end