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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a61c2789ad9c63e94264b1a54e3ba6948a81f03cac80e19ec7a3df610efbdf1
4
- data.tar.gz: 6a5eed71eda6b34bd1a359544780817fe5169589e10449b2ccbc8e2d1be3df14
3
+ metadata.gz: 17b6175344adc367f1deb934f937028c62aa1be0020292758036e880b6708d70
4
+ data.tar.gz: c789d183b35f4a5ad60157f092542abba5f5469efc56605f4d39175f7bac86b4
5
5
  SHA512:
6
- metadata.gz: 3ab80059021819110cc8028e4c54cd748738d07cab992bef4a9f7f230794bdf5daad45e6ac9efce743c305579511ba961a3738019039d1b93d7e5e5bd7431f03
7
- data.tar.gz: f710c9ac0c937771b69567b6879630067e747c9601eecd7b8f05d54ef9e870cecf054804eae081a92cb927da8e44595aada1c571ce20a3636e7dc98d480cf1c1
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="10033000" />
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
- <option name="localTasksCounter" value="5" />
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
- <option name="LAST_COMMIT_MESSAGE" value="Fix README" />
97
+ <MESSAGE value="Fix bug" />
98
+ <option name="LAST_COMMIT_MESSAGE" value="Fix bug" />
89
99
  </component>
90
100
  </project>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenaiImageGenerator
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
@@ -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, :prompt, :number_images, :size
14
+ attr_accessor :api_key
12
15
 
13
16
  def initialize(api_key)
14
17
  @api_key = api_key
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openai_image_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sadatetchamouza