Class: LlmHub::Embedding::Providers::Base Abstract

Inherits:
Object
  • Object
show all
Includes:
Common::AbstractMethods
Defined in:
lib/llm_hub/embedding/providers/base.rb

Overview

This class is abstract.

Subclass and override required methods to implement a provider

Base class for LLM embedding providers

Direct Known Subclasses

OpenAI

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common::AbstractMethods

included

Constructor Details

#initialize(api_key) ⇒ Base

Returns a new instance of Base.



13
14
15
# File 'lib/llm_hub/embedding/providers/base.rb', line 13

def initialize(api_key)
  @api_key = api_key
end

Instance Attribute Details

#api_keyObject (readonly)

Returns the value of attribute api_key.



11
12
13
# File 'lib/llm_hub/embedding/providers/base.rb', line 11

def api_key
  @api_key
end