runapi-gpt-image-2.5 0.1.1 → 0.2.0

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: 6cd397024ba3239277fb312b7dd4da089ff65c9e0162dd20e79f4571e84bed24
4
- data.tar.gz: 42e8ab5b7a4077c9e801c497ebe19e99e70406cdde176455ff6643a214d223a4
3
+ metadata.gz: 4dc78140d989a3963ce881d8dc00b5b1fc62b3ce77c17c03d065a34e36dca038
4
+ data.tar.gz: 87a40be64fb60d65ea30476e4e072437759a08d873e50d4e2be6a8688baf9b21
5
5
  SHA512:
6
- metadata.gz: 4b10afd2e511b10ccbc353ba38dcb29d2a08873d56ca6874f26cb4d1274b8c8c6b3bd1fe92b5586c67d898ce990d7288a056cdf8312c7e693651a9af03453d6b
7
- data.tar.gz: 4e89499704e0e52e6c3c37caab6a7010196fed79e1f27d57e7d68295980c34fa8704470cf40047c3448cf999de774bf399324f20d43d97f65de16f3c9a69129e
6
+ metadata.gz: 035a43e7351a54ba25ae555956b1f2b47485b79cdf6fbe3792b7b54c74644fd7bb38b5202f3b2945460586f39ee61e2097c207e0b0a093f5c31cde34a8cef9fd
7
+ data.tar.gz: 4a117635c31cc3f5a61cf22497591fee251dbf16eb726ed4fcb86f3d5a849836d0d333a7125dc20bfcfdbb05d7955714dc749f05a0bbe1987d2ffa120d28bfe5
@@ -24,7 +24,6 @@ module RunApi
24
24
 
25
25
  def create(options: nil, **params)
26
26
  params = compact_params(params)
27
- validate_contract!(CONTRACT["edit-image"], params)
28
27
  request(:post, ENDPOINT, body: params, options: options)
29
28
  end
30
29
 
@@ -24,7 +24,6 @@ module RunApi
24
24
 
25
25
  def create(options: nil, **params)
26
26
  params = compact_params(params)
27
- validate_contract!(CONTRACT["text-to-image"], params)
28
27
  request(:post, ENDPOINT, body: params, options: options)
29
28
  end
30
29
 
@@ -2,7 +2,6 @@
2
2
 
3
3
  require "runapi/core"
4
4
  require_relative "gpt_image_2_5/types"
5
- require_relative "gpt_image_2_5/contract_gen"
6
5
  require_relative "gpt_image_2_5/resources/text_to_image"
7
6
  require_relative "gpt_image_2_5/resources/edit_image"
8
7
  require_relative "gpt_image_2_5/client"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-gpt-image-2.5
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - RunAPI
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 0.5.0
18
+ version: 0.6.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 0.5.0
25
+ version: 0.6.0
26
26
  description: The GPT Image 2.5 Ruby SDK provides text-to-image and image editing clients.
27
27
  Requests select `gpt-image-2.5-flare` or `gpt-image-2.5-sunburst`.
28
28
  email:
@@ -37,7 +37,6 @@ files:
37
37
  - lib/runapi-gpt_image_2_5.rb
38
38
  - lib/runapi/gpt_image_2_5.rb
39
39
  - lib/runapi/gpt_image_2_5/client.rb
40
- - lib/runapi/gpt_image_2_5/contract_gen.rb
41
40
  - lib/runapi/gpt_image_2_5/resources/edit_image.rb
42
41
  - lib/runapi/gpt_image_2_5/resources/text_to_image.rb
43
42
  - lib/runapi/gpt_image_2_5/types.rb
@@ -65,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
64
  - !ruby/object:Gem::Version
66
65
  version: '0'
67
66
  requirements: []
68
- rubygems_version: 4.0.17
67
+ rubygems_version: 4.0.10
69
68
  specification_version: 4
70
69
  summary: GPT Image 2.5 Ruby SDK for RunAPI
71
70
  test_files: []
@@ -1,140 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RunApi
4
- module GptImage25
5
- CONTRACT = {
6
- "edit-image" => {
7
- "models" => ["gpt-image-2.5-flare", "gpt-image-2.5-sunburst"],
8
- "fields_by_model" => {
9
- "gpt-image-2.5-flare" => {
10
- "aspect_ratio" => {
11
- "enum" => ["auto", "1:1", "3:2", "2:3", "4:3", "3:4", "5:4", "4:5", "16:9", "9:16", "2:1", "1:2", "3:1", "1:3", "21:9", "9:21"]
12
- },
13
- "output_resolution" => {
14
- "enum" => ["1k", "2k", "4k"]
15
- },
16
- "prompt" => {
17
- "required" => true
18
- },
19
- "source_image_urls" => {
20
- "required" => true,
21
- "max_items" => 16
22
- }
23
- },
24
- "gpt-image-2.5-sunburst" => {
25
- "aspect_ratio" => {
26
- "enum" => ["auto", "1:1", "3:2", "2:3", "4:3", "3:4", "5:4", "4:5", "16:9", "9:16", "2:1", "1:2", "3:1", "1:3", "21:9", "9:21"]
27
- },
28
- "output_resolution" => {
29
- "enum" => ["1k", "2k", "4k"]
30
- },
31
- "prompt" => {
32
- "required" => true
33
- },
34
- "source_image_urls" => {
35
- "required" => true,
36
- "max_items" => 16
37
- }
38
- }
39
- },
40
- "rules" => [{
41
- "when" => {
42
- "aspect_ratio" => "1:1",
43
- "output_resolution" => "4k"
44
- },
45
- "forbidden" => ["aspect_ratio"]
46
- }, {
47
- "when" => {
48
- "aspect_ratio" => "auto",
49
- "output_resolution" => "4k"
50
- },
51
- "forbidden" => ["aspect_ratio"]
52
- }, {
53
- "when" => {
54
- "aspect_ratio" => {
55
- "present" => false
56
- },
57
- "output_resolution" => "4k"
58
- },
59
- "forbidden" => ["output_resolution"]
60
- }, {
61
- "when" => {
62
- "aspect_ratio" => "auto",
63
- "output_resolution" => "2k"
64
- },
65
- "forbidden" => ["aspect_ratio"]
66
- }, {
67
- "when" => {
68
- "aspect_ratio" => {
69
- "present" => false
70
- },
71
- "output_resolution" => "2k"
72
- },
73
- "forbidden" => ["output_resolution"]
74
- }]
75
- },
76
- "text-to-image" => {
77
- "models" => ["gpt-image-2.5-flare", "gpt-image-2.5-sunburst"],
78
- "fields_by_model" => {
79
- "gpt-image-2.5-flare" => {
80
- "aspect_ratio" => {
81
- "enum" => ["auto", "1:1", "3:2", "2:3", "4:3", "3:4", "5:4", "4:5", "16:9", "9:16", "2:1", "1:2", "3:1", "1:3", "21:9", "9:21"]
82
- },
83
- "output_resolution" => {
84
- "enum" => ["1k", "2k", "4k"]
85
- },
86
- "prompt" => {
87
- "required" => true
88
- }
89
- },
90
- "gpt-image-2.5-sunburst" => {
91
- "aspect_ratio" => {
92
- "enum" => ["auto", "1:1", "3:2", "2:3", "4:3", "3:4", "5:4", "4:5", "16:9", "9:16", "2:1", "1:2", "3:1", "1:3", "21:9", "9:21"]
93
- },
94
- "output_resolution" => {
95
- "enum" => ["1k", "2k", "4k"]
96
- },
97
- "prompt" => {
98
- "required" => true
99
- }
100
- }
101
- },
102
- "rules" => [{
103
- "when" => {
104
- "aspect_ratio" => "1:1",
105
- "output_resolution" => "4k"
106
- },
107
- "forbidden" => ["aspect_ratio"]
108
- }, {
109
- "when" => {
110
- "aspect_ratio" => "auto",
111
- "output_resolution" => "4k"
112
- },
113
- "forbidden" => ["aspect_ratio"]
114
- }, {
115
- "when" => {
116
- "aspect_ratio" => {
117
- "present" => false
118
- },
119
- "output_resolution" => "4k"
120
- },
121
- "forbidden" => ["output_resolution"]
122
- }, {
123
- "when" => {
124
- "aspect_ratio" => "auto",
125
- "output_resolution" => "2k"
126
- },
127
- "forbidden" => ["aspect_ratio"]
128
- }, {
129
- "when" => {
130
- "aspect_ratio" => {
131
- "present" => false
132
- },
133
- "output_resolution" => "2k"
134
- },
135
- "forbidden" => ["output_resolution"]
136
- }]
137
- }
138
- }.freeze
139
- end
140
- end