Class: Rafflesia::FoundryEmbeddingVector
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoundryEmbeddingVector
- Defined in:
- lib/rafflesia/foundry/foundry_embedding_vector.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, index: :index, object: :object, shape: :shape, values: :values }.freeze
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#index ⇒ Object
Returns the value of attribute index.
-
#object ⇒ Object
Returns the value of attribute object.
-
#shape ⇒ Object
Returns the value of attribute shape.
-
#values ⇒ Object
Returns the value of attribute values.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoundryEmbeddingVector
constructor
A new instance of FoundryEmbeddingVector.
Constructor Details
#initialize(json) ⇒ FoundryEmbeddingVector
Returns a new instance of FoundryEmbeddingVector.
23 24 25 26 27 28 29 30 31 |
# File 'lib/rafflesia/foundry/foundry_embedding_vector.rb', line 23 def initialize(json) super() hash = self.class.normalize(json) @id = hash[:id] @index = hash[:index] @object = hash[:object] @shape = (hash[:shape] || []) @values = (hash[:values] || []) end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
16 17 18 |
# File 'lib/rafflesia/foundry/foundry_embedding_vector.rb', line 16 def id @id end |
#index ⇒ Object
Returns the value of attribute index.
16 17 18 |
# File 'lib/rafflesia/foundry/foundry_embedding_vector.rb', line 16 def index @index end |
#object ⇒ Object
Returns the value of attribute object.
16 17 18 |
# File 'lib/rafflesia/foundry/foundry_embedding_vector.rb', line 16 def object @object end |
#shape ⇒ Object
Returns the value of attribute shape.
16 17 18 |
# File 'lib/rafflesia/foundry/foundry_embedding_vector.rb', line 16 def shape @shape end |
#values ⇒ Object
Returns the value of attribute values.
16 17 18 |
# File 'lib/rafflesia/foundry/foundry_embedding_vector.rb', line 16 def values @values end |