Sha256: 54a68eafb0b80addd2337cb744c028c289faaf0958a6e5375e395b9f837c5b3b

Contents?: true

Size: 467 Bytes

Versions: 21

Compression:

Stored size: 467 Bytes

Contents

# frozen_string_literal: true

require 'dotenv'
# Dotenv.load(".env.#{ENV['APP_ENV']}") # Loads environment-specific dotenv file.
Dotenv.load('.env')

OpenAI.configure do |config|
  tools_enabled = ENV.fetch('TOOLS_ENABLED', 'false')

  if tools_enabled == 'true'
    puts 'Tools are enabled, OpenAI will allow net connections'
    config.access_token = ENV.fetch('OPENAI_ACCESS_TOKEN')
    config.organization_id = ENV.fetch('OPENAI_ORGANIZATION_ID', nil)
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
appydave-tools-0.11.11 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.11.10 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.11.9 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.11.8 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.11.7 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.11.6 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.11.5 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.11.4 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.11.3 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.11.2 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.11.1 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.11.0 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.10.4 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.10.3 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.10.2 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.10.1 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.10.0 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.9.5 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.9.4 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.9.3 lib/appydave/tools/configuration/openai.rb