runapi-flux 0.1.3 → 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: 93af9673cb99ab42e7fce8c1b91f7a60d0277e5f3ab5b6a3446279f27a147236
4
- data.tar.gz: 2b29712d76bad0fea9ea939ea08db44dd90da0e7e0e4c841a07269f471977e40
3
+ metadata.gz: f7c101f576c127556befdc31b6c3d30d7c65cc869c7f8adb146b8c07647b88af
4
+ data.tar.gz: c32ad23b9a32b6eb06881fe4847aa778c75d1f79ecf77d63070036f574c4898f
5
5
  SHA512:
6
- metadata.gz: e86117751e22a4d73407171adb775f9f0ac96df943a97b9b1f13df37b289e71bc5291157af656039a7b338477abc86b707e09fa46893cd2d7b88bef6df2a44c2
7
- data.tar.gz: cf8c7e502fef56274ae0f3c9d07d3ea584ac25e5b26c95cee29133432bc8bbe1be443979fd8da831ae7ae3cf8502f8fc59228273416394fca66c2d99b331830e
6
+ metadata.gz: b21c6d91e5e300b2c354f89d620c7eadcca94dc86535c9e16fba0a752fa24206a69608758a6b534ff68b2b2a378ef97f02c6424f5f3e7c1d71ef17a7869cfdd3
7
+ data.tar.gz: 1f592a02291be3ecd3d1d4dcf8d2878f8d6452147f45d23a73010117c6369980a77cb40575652127a9ca41b4e57390073a37501a012ec44c60968d7e6ef2b7d6
@@ -21,7 +21,6 @@ module RunApi
21
21
 
22
22
  def create(options: nil, **params)
23
23
  params = compact_params(params)
24
- validate_contract!(CONTRACT["remix-image"], params)
25
24
  request(:post, ENDPOINT, body: params, options: options)
26
25
  end
27
26
 
@@ -21,7 +21,6 @@ module RunApi
21
21
 
22
22
  def create(options: nil, **params)
23
23
  params = compact_params(params)
24
- validate_contract!(CONTRACT["text-to-image"], params)
25
24
  request(:post, ENDPOINT, body: params, options: options)
26
25
  end
27
26
 
data/lib/runapi/flux.rb CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  require "runapi/core"
4
4
  require_relative "flux/types"
5
- require_relative "flux/contract_gen"
6
5
  require_relative "flux/resources/text_to_image"
7
6
  require_relative "flux/resources/remix_image"
8
7
  require_relative "flux/client"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-flux
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
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 Flux Ruby SDK is the language-specific package for Flux on RunAPI.
27
27
  Use this package for image generation, image editing, and creative production workflows
28
28
  when your application needs request bodies, task status lookup, and consistent RunAPI
@@ -39,7 +39,6 @@ files:
39
39
  - lib/runapi-flux.rb
40
40
  - lib/runapi/flux.rb
41
41
  - lib/runapi/flux/client.rb
42
- - lib/runapi/flux/contract_gen.rb
43
42
  - lib/runapi/flux/resources/remix_image.rb
44
43
  - lib/runapi/flux/resources/text_to_image.rb
45
44
  - lib/runapi/flux/types.rb
@@ -67,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
66
  - !ruby/object:Gem::Version
68
67
  version: '0'
69
68
  requirements: []
70
- rubygems_version: 4.0.17
69
+ rubygems_version: 4.0.10
71
70
  specification_version: 4
72
71
  summary: Flux API Ruby SDK for RunAPI
73
72
  test_files: []
@@ -1,99 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RunApi
4
- module Flux
5
- CONTRACT = {
6
- "remix-image" => {
7
- "models" => ["flux-dev", "flux-pro"],
8
- "fields_by_model" => {
9
- "flux-dev" => {
10
- "aspect_ratio" => {
11
- "enum" => ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3"]
12
- },
13
- "output_count" => {
14
- "enum" => [1],
15
- "type" => "integer"
16
- },
17
- "prompt" => {
18
- "required" => true,
19
- "min" => 3,
20
- "max" => 5000,
21
- "length" => true
22
- },
23
- "source_image_url" => {
24
- "required" => true
25
- }
26
- },
27
- "flux-pro" => {
28
- "aspect_ratio" => {
29
- "enum" => ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3"]
30
- },
31
- "output_count" => {
32
- "enum" => [1],
33
- "type" => "integer"
34
- },
35
- "prompt" => {
36
- "required" => true,
37
- "min" => 3,
38
- "max" => 5000,
39
- "length" => true
40
- },
41
- "source_image_url" => {
42
- "required" => true
43
- }
44
- }
45
- }
46
- },
47
- "text-to-image" => {
48
- "models" => ["flux-2-klein", "flux-dev", "flux-pro"],
49
- "fields_by_model" => {
50
- "flux-2-klein" => {
51
- "aspect_ratio" => {
52
- "enum" => ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3"]
53
- },
54
- "output_count" => {
55
- "enum" => [1],
56
- "type" => "integer"
57
- },
58
- "prompt" => {
59
- "required" => true,
60
- "min" => 3,
61
- "max" => 5000,
62
- "length" => true
63
- }
64
- },
65
- "flux-dev" => {
66
- "aspect_ratio" => {
67
- "enum" => ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3"]
68
- },
69
- "output_count" => {
70
- "enum" => [1],
71
- "type" => "integer"
72
- },
73
- "prompt" => {
74
- "required" => true,
75
- "min" => 3,
76
- "max" => 5000,
77
- "length" => true
78
- }
79
- },
80
- "flux-pro" => {
81
- "aspect_ratio" => {
82
- "enum" => ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3"]
83
- },
84
- "output_count" => {
85
- "enum" => [1],
86
- "type" => "integer"
87
- },
88
- "prompt" => {
89
- "required" => true,
90
- "min" => 3,
91
- "max" => 5000,
92
- "length" => true
93
- }
94
- }
95
- }
96
- }
97
- }.freeze
98
- end
99
- end