Sha256: 5f5ed53b456795ed0220f9fd079670004c85241cfddd023522485cff0f2305ab

Contents?: true

Size: 693 Bytes

Versions: 14

Compression:

Stored size: 693 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"
require "boxcars/engine/gpt4all_eng"

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
boxcars-0.3.5 lib/boxcars/engine.rb
boxcars-0.3.4 lib/boxcars/engine.rb
boxcars-0.3.3 lib/boxcars/engine.rb
boxcars-0.3.2 lib/boxcars/engine.rb
boxcars-0.3.1 lib/boxcars/engine.rb
boxcars-0.2.16 lib/boxcars/engine.rb
boxcars-0.2.15 lib/boxcars/engine.rb
boxcars-0.2.14 lib/boxcars/engine.rb
boxcars-0.2.13 lib/boxcars/engine.rb
boxcars-0.2.12 lib/boxcars/engine.rb
boxcars-0.2.11 lib/boxcars/engine.rb
boxcars-0.2.10 lib/boxcars/engine.rb
boxcars-0.2.9 lib/boxcars/engine.rb
boxcars-0.2.8 lib/boxcars/engine.rb