Sha256: ab8b664e7e307fc26375a7b460540fe0e6990714f522e9b01435099c03887c84

Contents?: true

Size: 522 Bytes

Versions: 4

Compression:

Stored size: 522 Bytes

Contents

require "webshaker/scrape_result"
require "webshaker/scraper"
require "webshaker/ai"
require "webshaker/shaker"

module Webshaker
  class Configuration
    attr_accessor :open_ai_key, :model

    def initialize
      @open_ai_key = ENV.fetch("WEBSHAKER_OPEN_AI_KEY", nil)
      @model = ENV.fetch("WEBSHAKER_OPEN_AI_MODEL", "gpt-4o-mini")
    end
  end

  class << self
    attr_writer :config

    def config
      @config ||= Webshaker::Configuration.new
    end

    def configure
      yield(config)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
webshaker-0.0.6 lib/webshaker.rb
webshaker-0.0.5 lib/webshaker.rb
webshaker-0.0.4 lib/webshaker.rb
webshaker-0.0.3 lib/webshaker.rb