Class: Zwischen::AI::BaseClient
- Inherits:
-
Object
- Object
- Zwischen::AI::BaseClient
- Defined in:
- lib/zwischen/ai/base_client.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #analyze(prompt) ⇒ Object
-
#initialize(api_key: nil, config: {}) ⇒ BaseClient
constructor
A new instance of BaseClient.
Constructor Details
#initialize(api_key: nil, config: {}) ⇒ BaseClient
Returns a new instance of BaseClient.
10 11 12 13 14 |
# File 'lib/zwischen/ai/base_client.rb', line 10 def initialize(api_key: nil, config: {}) @api_key = api_key @config = config validate_config! end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
8 9 10 |
# File 'lib/zwischen/ai/base_client.rb', line 8 def api_key @api_key end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
8 9 10 |
# File 'lib/zwischen/ai/base_client.rb', line 8 def config @config end |
Instance Method Details
#analyze(prompt) ⇒ Object
16 17 18 |
# File 'lib/zwischen/ai/base_client.rb', line 16 def analyze(prompt) raise NotImplementedError, "#{self.class.name} must implement #analyze" end |