Module: Engram::Ports::Completion

Included in:
Adapters::FakeCompletion, Adapters::RubyLLMCompletion
Defined in:
lib/engram/ports/completion.rb

Overview

Contract for structured LLM calls used by extraction and consolidation. Implementations: Adapters::RubyLLMCompletion (real), Adapters::FakeCompletion (tests).

Instance Method Summary collapse

Instance Method Details

#complete(system:, user:, schema:) ⇒ Object

Run a completion and return parsed structured data conforming to ‘schema` (a JSON-schema-ish Hash). `system` and `user` are prompt strings.

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/engram/ports/completion.rb', line 10

def complete(system:, user:, schema:)
  raise NotImplementedError, "#{self.class} must implement #complete"
end