Sha256: 69548c7381aa2ce3324626c4a5edef94285a42abf2ec57ac69b27e7ab33f99f4

Contents?: true

Size: 656 Bytes

Versions: 16

Compression:

Stored size: 656 Bytes

Contents

# frozen_string_literal: true

module Boxcars
  # @abstract
  class Engine
    # An Engine is used by Boxcars to generate output from prompts
    # @param name [String] The name of the Engine. Defaults to classname.
    # @param description [String] A description of the Engine.
    def initialize(description: 'Engine', name: nil)
      @name = name || self.class.name
      @description = description
    end

    # Get an answer from the Engine.
    # @param question [String] The question to ask the Engine.
    def run(question)
      raise NotImplementedError
    end
  end
end

require "boxcars/engine/engine_result"
require "boxcars/engine/openai"

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
boxcars-0.2.7 lib/boxcars/engine.rb
boxcars-0.2.5 lib/boxcars/engine.rb
boxcars-0.2.4 lib/boxcars/engine.rb
boxcars-0.2.3 lib/boxcars/engine.rb
boxcars-0.2.2 lib/boxcars/engine.rb
boxcars-0.2.1 lib/boxcars/engine.rb
boxcars-0.2.0 lib/boxcars/engine.rb
boxcars-0.1.8 lib/boxcars/engine.rb
boxcars-0.1.7 lib/boxcars/engine.rb
boxcars-0.1.6 lib/boxcars/engine.rb
boxcars-0.1.5 lib/boxcars/engine.rb
boxcars-0.1.4 lib/boxcars/engine.rb
boxcars-0.1.3 lib/boxcars/engine.rb
boxcars-0.1.2 lib/boxcars/engine.rb
boxcars-0.1.1 lib/boxcars/engine.rb
boxcars-0.1.0 lib/boxcars/engine.rb