Class: Rafflesia::FoundryEmbeddingUsage
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoundryEmbeddingUsage
- 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
-
#input_count ⇒ Object
Returns the value of attribute input_count.
-
#token_count ⇒ Object
Returns the value of attribute token_count.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoundryEmbeddingUsage
constructor
A new instance of FoundryEmbeddingUsage.
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_count ⇒ Object
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_count ⇒ Object
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 |