Class: Rafflesia::FoundryEmbeddingRequest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoundryEmbeddingRequest
- Defined in:
- lib/rafflesia/foundry/foundry_embedding_request.rb
Constant Summary collapse
- HASH_ATTRS =
{ inputs: :inputs, layer: :layer, output_format: :output_format, pooling: :pooling }.freeze
Instance Attribute Summary collapse
-
#inputs ⇒ Object
Returns the value of attribute inputs.
-
#layer ⇒ Object
Returns the value of attribute layer.
-
#output_format ⇒ Object
Returns the value of attribute output_format.
-
#pooling ⇒ Object
Returns the value of attribute pooling.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoundryEmbeddingRequest
constructor
A new instance of FoundryEmbeddingRequest.
Constructor Details
#initialize(json) ⇒ FoundryEmbeddingRequest
Returns a new instance of FoundryEmbeddingRequest.
21 22 23 24 25 26 27 28 |
# File 'lib/rafflesia/foundry/foundry_embedding_request.rb', line 21 def initialize(json) super() hash = self.class.normalize(json) @inputs = (hash[:inputs] || []).map { |item| item ? Rafflesia::FoundryEmbeddingInput.new(item) : nil } @layer = hash[:layer] @output_format = hash[:output_format] @pooling = hash[:pooling] end |
Instance Attribute Details
#inputs ⇒ Object
Returns the value of attribute inputs.
15 16 17 |
# File 'lib/rafflesia/foundry/foundry_embedding_request.rb', line 15 def inputs @inputs end |
#layer ⇒ Object
Returns the value of attribute layer.
15 16 17 |
# File 'lib/rafflesia/foundry/foundry_embedding_request.rb', line 15 def layer @layer end |
#output_format ⇒ Object
Returns the value of attribute output_format.
15 16 17 |
# File 'lib/rafflesia/foundry/foundry_embedding_request.rb', line 15 def output_format @output_format end |
#pooling ⇒ Object
Returns the value of attribute pooling.
15 16 17 |
# File 'lib/rafflesia/foundry/foundry_embedding_request.rb', line 15 def pooling @pooling end |