openaiext 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openaiext.rb +9 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 001ae93d35a8aa13a2e2fe167e027849068c67e3b67e5691b0a1486ba32038b1
|
4
|
+
data.tar.gz: 4bee70a359b8b751a02cb293c0a200bb2775e303e2f96914bec7b8dd42bf3733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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-
|
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.
|
72
|
+
rubygems_version: 3.5.23
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: Ruby OpenAI Extended
|