Class: ActiveAgent::GenerationProvider::Base
- Inherits:
-
Object
- Object
- ActiveAgent::GenerationProvider::Base
- Defined in:
- lib/active_agent/generation_provider/base.rb
Direct Known Subclasses
Defined Under Namespace
Classes: GenerationProviderError
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#prompt ⇒ Object
readonly
Returns the value of attribute prompt.
Instance Method Summary collapse
- #generate(prompt) ⇒ Object
-
#initialize(config) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(config) ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 |
# File 'lib/active_agent/generation_provider/base.rb', line 9 def initialize(config) @config = config @prompt = nil @response = nil end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
7 8 9 |
# File 'lib/active_agent/generation_provider/base.rb', line 7 def client @client end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/active_agent/generation_provider/base.rb', line 7 def config @config end |
#prompt ⇒ Object (readonly)
Returns the value of attribute prompt.
7 8 9 |
# File 'lib/active_agent/generation_provider/base.rb', line 7 def prompt @prompt end |
Instance Method Details
#generate(prompt) ⇒ Object
15 16 17 |
# File 'lib/active_agent/generation_provider/base.rb', line 15 def generate(prompt) raise NotImplementedError, "Subclasses must implement the 'generate' method" end |