openai_image_generator 0.0.1 → 0.0.2
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 +4 -4
- data/.idea/workspace.xml +14 -4
- data/lib/openai_image_generator/version.rb +1 -1
- data/lib/openai_image_generator.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17b6175344adc367f1deb934f937028c62aa1be0020292758036e880b6708d70
|
4
|
+
data.tar.gz: c789d183b35f4a5ad60157f092542abba5f5469efc56605f4d39175f7bac86b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcd29291ceae3466a77ff0101847473054a0153c776b655271323d56103d529b4675f12b19cc98236503552615e0ce6fab9aa6476538b88df5ff8dd5095529e4
|
7
|
+
data.tar.gz: 61bb5c01c07dcc74612aeb13652e75aa5ac4bce9b169ee3ac2996ddd4689bcf781047507d91f128a9dc9be28d157ac2c89e039190b6b8d3bdc772d593593718f
|
data/.idea/workspace.xml
CHANGED
@@ -4,7 +4,9 @@
|
|
4
4
|
<option name="autoReloadType" value="SELECTIVE" />
|
5
5
|
</component>
|
6
6
|
<component name="ChangeListManager">
|
7
|
-
<list default="true" id="0e4ba045-e93f-4585-9ec4-e4c737fd7207" name="Changes" comment=""
|
7
|
+
<list default="true" id="0e4ba045-e93f-4585-9ec4-e4c737fd7207" name="Changes" comment="">
|
8
|
+
<change beforePath="$PROJECT_DIR$/lib/openai_image_generator/version.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/openai_image_generator/version.rb" afterDir="false" />
|
9
|
+
</list>
|
8
10
|
<option name="SHOW_DIALOG" value="false" />
|
9
11
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
10
12
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
@@ -46,7 +48,7 @@
|
|
46
48
|
<option name="presentableId" value="Default" />
|
47
49
|
<updated>1679755504055</updated>
|
48
50
|
<workItem from="1679755505466" duration="11000" />
|
49
|
-
<workItem from="1679755574211" duration="
|
51
|
+
<workItem from="1679755574211" duration="11086000" />
|
50
52
|
</task>
|
51
53
|
<task id="LOCAL-00001" summary="Fix Github actions">
|
52
54
|
<created>1679776166112</created>
|
@@ -76,7 +78,14 @@
|
|
76
78
|
<option name="project" value="LOCAL" />
|
77
79
|
<updated>1679778413358</updated>
|
78
80
|
</task>
|
79
|
-
<
|
81
|
+
<task id="LOCAL-00005" summary="Fix bug">
|
82
|
+
<created>1679780147550</created>
|
83
|
+
<option name="number" value="00005" />
|
84
|
+
<option name="presentableId" value="LOCAL-00005" />
|
85
|
+
<option name="project" value="LOCAL" />
|
86
|
+
<updated>1679780147550</updated>
|
87
|
+
</task>
|
88
|
+
<option name="localTasksCounter" value="6" />
|
80
89
|
<servers />
|
81
90
|
</component>
|
82
91
|
<component name="TypeScriptGeneratedFilesManager">
|
@@ -85,6 +94,7 @@
|
|
85
94
|
<component name="VcsManagerConfiguration">
|
86
95
|
<MESSAGE value="Fix Github actions" />
|
87
96
|
<MESSAGE value="Fix README" />
|
88
|
-
<
|
97
|
+
<MESSAGE value="Fix bug" />
|
98
|
+
<option name="LAST_COMMIT_MESSAGE" value="Fix bug" />
|
89
99
|
</component>
|
90
100
|
</project>
|
@@ -1,5 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'uri'
|
4
|
+
require 'net/http'
|
5
|
+
require 'json'
|
3
6
|
require_relative "openai_image_generator/version"
|
4
7
|
|
5
8
|
module OpenaiImageGenerator
|
@@ -8,7 +11,7 @@ module OpenaiImageGenerator
|
|
8
11
|
class Client
|
9
12
|
API_URL = URI.parse("https://api.openai.com/v1/images/generations".freeze)
|
10
13
|
|
11
|
-
attr_accessor :api_key
|
14
|
+
attr_accessor :api_key
|
12
15
|
|
13
16
|
def initialize(api_key)
|
14
17
|
@api_key = api_key
|