openaiext 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/openaiext.rb +9 -0
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41b05586226d777a40b9a92f3df343a8c4dabbf3308879b3dbf333707148ee06
4
- data.tar.gz: 932e68b7d141a9082a703a1e848b620a40ea56005d510c843b619b370f54f1ea
3
+ metadata.gz: 001ae93d35a8aa13a2e2fe167e027849068c67e3b67e5691b0a1486ba32038b1
4
+ data.tar.gz: 4bee70a359b8b751a02cb293c0a200bb2775e303e2f96914bec7b8dd42bf3733
5
5
  SHA512:
6
- metadata.gz: 2e7e8fb1032594f7eeaa01ecce877932bb661a890ec2388ba97488fdc36795f168a36a30e4fa207294cfbd3bcffb89fd85fe91a35da775a4f6fd035dffc4ea79
7
- data.tar.gz: 16fb70150afa2ca8d8ec1616f487d247bea38a356ac3cb9e89923a032867b1bde70d565846edcdf0b282919ab607f1f028cedbba249754a40a13dd96e0981015
6
+ metadata.gz: 25aacf4d31e2919c1d5e09d5c25335e29dfc2b0823b14e53087d26fa1172d5bd3671eb2006ec2c218220062328c4e51999d580bc0999c7732b2cf24c96ea8dd7
7
+ data.tar.gz: 97330fe2fc52929de29f8fb13dd46d2831e1b6a28761997552731f9a9abb87957504f36241ea83d7f6cdebe37891dafe45065494f0f1b4ab3029303b1f4088dd
data/lib/openaiext.rb CHANGED
@@ -70,4 +70,13 @@ module OpenAIExt
70
70
  end
71
71
 
72
72
  def self.models = OpenAI::Client.new.models.list
73
+
74
+ def self.load_config
75
+ OpenAI.configure do |config|
76
+ config.access_token = ENV.fetch('OPENAI_ACCESS_TOKEN')
77
+ config.organization_id = ENV.fetch('OPENAI_ORGANIZATION_ID')
78
+ config.request_timeout = 300
79
+ config.log_errors = true
80
+ end
81
+ end
73
82
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openaiext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gedean Dias
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-04 00:00:00.000000000 Z
11
+ date: 2024-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-openai
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.5.22
72
+ rubygems_version: 3.5.23
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Ruby OpenAI Extended