Class: Openai::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/openai/base.rb

Overview

Base class of openai

Direct Known Subclasses

Assistant

Instance Method Summary collapse

Constructor Details

#initialize(api_key = "") ⇒ Base

Returns a new instance of Base.



12
13
14
15
16
17
18
# File 'lib/openai/base.rb', line 12

def initialize(api_key = "")
  @openai_api_key = api_key
  # hard the host because if the official docs change the host, maybe it will change another
  # we need to update this gem for any change
  @openai_url = "https://api.openai.com/v1/assistants"
  @http_client = Http::Client.new
end