runapi-flux 0.1.2 → 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: 8c2b00c7f9e9315c4b3abeb3ac10ab3f0b4084dbf98a08217f44be45148619e7
4
- data.tar.gz: 800b3b444ae09467039699647600fcd2486613b21387351c99f9519fa5289bc7
3
+ metadata.gz: f7c101f576c127556befdc31b6c3d30d7c65cc869c7f8adb146b8c07647b88af
4
+ data.tar.gz: c32ad23b9a32b6eb06881fe4847aa778c75d1f79ecf77d63070036f574c4898f
5
5
  SHA512:
6
- metadata.gz: b556b3c6634153f9f091338b36195776a950ae66403edd8923f6f9f1c3b487a5df12792c8413348ec814a8be009c5fc33791914a35d17525d3f7bf8afac06298
7
- data.tar.gz: 6af01eb616cc1bc6b098478f84bd4566fae992845931aa10d4ffdb99d00d328698c6a55c94425d0489e1939f7c536e8225d925a74c876b1468066c2c01a3b12f
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.2
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.4.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.4.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
@@ -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