openai_ruby 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5873de02b645485ae0e1850fe232ac3a4825f083f227fc0eccd886a2ae9c6b1
4
- data.tar.gz: 4e1fdaca2c2dd90aa5e1f20f7628d1896e3dfc0f0cf9a57682f44a622232268c
3
+ metadata.gz: 10448ace53f6e68e2bc60436138502f2a14f80d4bd4a45605371c117debb322f
4
+ data.tar.gz: b9c0ae0b2ba465cb214bfe5e6cbd5e7ba5a529c2cb074e627673c2d550ccd3cb
5
5
  SHA512:
6
- metadata.gz: 3a608e43e0b62805b44a817db7a0000f219c2d6fe82bf742a0f2f5f176d4d2e536fb2a723071fef5e69520b193e4af7fa6b1a2834ac502438d2c39903a34681f
7
- data.tar.gz: 691b0d2f5c0ca192a5e9079157407ee79d044d7fce237cc1eedacaf0eb02dd95bce07f89273f6e4580f4f0d259eb488eb9c0033b6bfc6599549da33518fef8cf
6
+ metadata.gz: c1223c6e2ee85062aed87dcee156af3c54f46819c948a15aebf641e2defa0f8a368e69f4c102f4c2ac6a3436950dc0825bd9e39db7251591353327b597265c73
7
+ data.tar.gz: 8562163de47249a331df8727ec6347a02699e30d2ad56badc0b4cac3c8815a9c0e12717afe086fce230152d0d150d99f15612e57fdfcdd53d72b1f8453912732
data/README.md CHANGED
@@ -32,7 +32,7 @@ client = OpenAI::Client.new("your OpenAI key here")
32
32
  Or you can pass a hash of options to customize the connection:
33
33
 
34
34
  ```ruby
35
- client = OpenAI::Client.new("your OpenAI key here", { base_uri: "https://example.com/", request: { timeout: 20 } })
35
+ client = OpenAI::Client.new("your OpenAI key here", { base_uri: "https://example.com", request: { timeout: 20 } })
36
36
  ```
37
37
 
38
38
  For more options check [here](https://lostisland.github.io/faraday/#/customization/connection-options)
@@ -4,7 +4,7 @@ module OpenAI
4
4
  class Client
5
5
  DEFAULT_BASE_URI = "https://api.openai.com"
6
6
 
7
- attr_reader :api_key, :options
7
+ attr_reader :api_key, :options, :base_uri
8
8
 
9
9
  def initialize(api_key, options = {})
10
10
  @api_key = api_key
@@ -58,7 +58,7 @@ module OpenAI
58
58
  private
59
59
 
60
60
  def connection
61
- Faraday.new({ url: base_uri, headers: headers }.merge(options))
61
+ Faraday.new({ url: base_uri, headers: headers }.merge(options.except(:base_uri)))
62
62
  end
63
63
 
64
64
  def headers
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenAI
4
- VERSION = "0.4.1"
4
+ VERSION = "0.4.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openai_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Renny Ren