Class: Silas::Adapters::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/silas/adapters/base.rb

Overview

The inference seam. An engine executes exactly ONE model call for a step and reports what came back; the framework owns the loop, the ledger owns tool execution.

Direct Known Subclasses

RubyLLM, Eval::ScriptedEngine

Instance Method Summary collapse

Instance Method Details

#execute_step(context, &on_event) ⇒ Object

context: { turn:, index:, system:, messages:, tools:, model:, limits: } Yields Silas::Event objects as they stream; returns a Result.

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/silas/adapters/base.rb', line 17

def execute_step(context, &on_event)
  raise NotImplementedError, "#{self.class} must implement #execute_step"
end