Sha256: 6c26d809309b0a5df402bfae862eee583173b8f456c85004ea67fa88024a657f

Contents?: true

Size: 561 Bytes

Versions: 1

Compression:

Stored size: 561 Bytes

Contents

# frozen_string_literal: true

module BddOpenai
  module Services
    module Files
      class Base
        # @param api_key [String] The key of the OpenAI API
        def initialize(api_key = '')
          @http_client = BddOpenai::Client::HttpClient.new
          @openai_api_domain = 'https://api.openai.com/v1'
          @openai_api_key = api_key
        end

        def default_headers
          {
            "Authorization": "Bearer #{@openai_api_key}",
            "Content-Type": 'application/json'
          }
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bdd_openai-1.1.0 lib/bdd_openai/services/files/base.rb