Class: EvalRuby::Embedders::Base
- Inherits:
-
Object
- Object
- EvalRuby::Embedders::Base
- Defined in:
- lib/eval_ruby/embedders/base.rb
Overview
Direct Known Subclasses
Instance Method Summary collapse
-
#call(texts) ⇒ Array<Array<Float>>
Embeds a batch of texts.
-
#initialize(config) ⇒ Base
constructor
A new instance of Base.
-
#model ⇒ String
Model identifier (e.g. "text-embedding-3-small").
Constructor Details
#initialize(config) ⇒ Base
Returns a new instance of Base.
11 12 13 |
# File 'lib/eval_ruby/embedders/base.rb', line 11 def initialize(config) @config = config end |
Instance Method Details
#call(texts) ⇒ Array<Array<Float>>
Embeds a batch of texts.
19 20 21 |
# File 'lib/eval_ruby/embedders/base.rb', line 19 def call(texts) raise NotImplementedError, "#{self.class}#call must be implemented" end |
#model ⇒ String
Returns model identifier (e.g. "text-embedding-3-small").
24 25 26 |
# File 'lib/eval_ruby/embedders/base.rb', line 24 def model raise NotImplementedError, "#{self.class}#model must be implemented" end |