Sha256: ae9dd8713e567631de27b8bf215d314391a3b64f2a23a327d61f1d2af2c32cfd

Contents?: true

Size: 439 Bytes

Versions: 8

Compression:

Stored size: 439 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 'OpenAI Tools are enabled'
    config.access_token = ENV.fetch('OPENAI_ACCESS_TOKEN')
    config.organization_id = ENV.fetch('OPENAI_ORGANIZATION_ID', nil)
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
openai_101-1.2.3 lib/openai101/config/openai.rb
openai_101-1.2.2 lib/openai101/config/openai.rb
openai_101-1.2.1 lib/openai101/config/openai.rb
appydave-tools-0.9.1 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.9.0 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.8.0 lib/appydave/tools/configuration/openai.rb
appydave-tools-0.7.0 lib/appydave/tools/configuration/openai.rb
openai_101-1.0.0 lib/openai_101/config/openai.rb