Class: LlmOrchestrator::LLM
- Inherits:
-
Object
- Object
- LlmOrchestrator::LLM
- Defined in:
- lib/llm_orchestrator/llm.rb
Overview
Base class for LLM providers Defines the interface that all LLM implementations must follow
Instance Method Summary collapse
- #generate(prompt, context: nil, **options) ⇒ Object
-
#initialize(api_key: nil, model: nil, temperature: nil, max_tokens: nil) ⇒ LLM
constructor
A new instance of LLM.
Constructor Details
#initialize(api_key: nil, model: nil, temperature: nil, max_tokens: nil) ⇒ LLM
10 11 12 13 14 15 |
# File 'lib/llm_orchestrator/llm.rb', line 10 def initialize(api_key: nil, model: nil, temperature: nil, max_tokens: nil) @api_key = api_key @model = model @temperature = temperature @max_tokens = max_tokens end |
Instance Method Details
#generate(prompt, context: nil, **options) ⇒ Object
17 18 19 |
# File 'lib/llm_orchestrator/llm.rb', line 17 def generate(prompt, context: nil, **) raise NotImplementedError, "Subclasses must implement generate method" end |