Class: BddOpenai::Services::Files::Base
- Inherits:
-
Object
- Object
- BddOpenai::Services::Files::Base
- Defined in:
- lib/bdd_openai/services/files/base.rb
Instance Method Summary collapse
- #default_headers ⇒ Object
-
#initialize(api_key = '') ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(api_key = '') ⇒ Base
Returns a new instance of Base.
8 9 10 11 12 |
# File 'lib/bdd_openai/services/files/base.rb', line 8 def initialize(api_key = '') @http_client = BddOpenai::Client::HttpClient.new @openai_api_domain = 'https://api.openai.com/v1' @openai_api_key = api_key end |
Instance Method Details
#default_headers ⇒ Object
14 15 16 17 18 19 |
# File 'lib/bdd_openai/services/files/base.rb', line 14 def default_headers { "Authorization": "Bearer #{@openai_api_key}", "Content-Type": 'application/json' } end |