Class: DeepAgents::Models::BaseModel
- Inherits:
-
Object
- Object
- DeepAgents::Models::BaseModel
- Defined in:
- lib/deepagents/models.rb
Overview
Base model class for LLM models
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
- #generate(prompt, tools = nil) ⇒ Object
-
#initialize(model:) ⇒ BaseModel
constructor
A new instance of BaseModel.
- #to_langchain_model ⇒ Object
Constructor Details
#initialize(model:) ⇒ BaseModel
Returns a new instance of BaseModel.
9 10 11 |
# File 'lib/deepagents/models.rb', line 9 def initialize(model:) @model = model end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
7 8 9 |
# File 'lib/deepagents/models.rb', line 7 def model @model end |
Instance Method Details
#generate(prompt, tools = nil) ⇒ Object
13 14 15 |
# File 'lib/deepagents/models.rb', line 13 def generate(prompt, tools = nil) raise NotImplementedError, "Subclasses must implement the generate method" end |
#to_langchain_model ⇒ Object
17 18 19 |
# File 'lib/deepagents/models.rb', line 17 def to_langchain_model raise NotImplementedError, "Subclasses must implement the to_langchain_model method" end |