Method: OmniAI::OpenAI::Client#connection
- Defined in:
- lib/omniai/openai/client.rb
#connection ⇒ HTTP::Client
62 63 64 65 66 67 68 69 70 |
# File 'lib/omniai/openai/client.rb', line 62 def connection @connection ||= begin http = super http = http.auth("Bearer #{@api_key}") if @api_key http = http.headers("OpenAI-Organization": @organization) if @organization http = http.headers("OpenAI-Project": @project) if @project http end end |