runapi-flux-kontext 0.2.7 → 0.2.8

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: 375bd55954b0fcc6fc0af7cb22d3102a67e40b216aebb3f7036f88235854a1cf
4
- data.tar.gz: bb1146e64a121ed83e2315925dcdccf108d9937f08cafdff698bed0ba1d03bbc
3
+ metadata.gz: 57ca847ab8beff9fed385c42627d4cd19e78861ace2358203947dce22b607e18
4
+ data.tar.gz: e36181fc9c66c936e0bfa9a208bbd8c443ca8287d972df51b912cd254564a5b1
5
5
  SHA512:
6
- metadata.gz: c1ba0956ecaac80618fefbb20fa3838b2db99e7ad74905b70922e0376fab40beb1f60cb74132570411bb5f13900d9069dd9ab7ba8d07cf58e615bae407d5cd4b
7
- data.tar.gz: eb9fac4245227b237775a761c98d4b9c76338e8f05a53682a704eef9d3019fe6ae0194e417c97b4c5f3345d77fb1f944fbec1e2efbe320271260be59ce65334d
6
+ metadata.gz: 0441a5627c3f9d02e09a7bafb89ba0b091b2f516328980ee813e338a36b9f2758dc53401ba8f90b6dcab6ca30f156d3fc667e0d5941362b034f36dacf649f73f
7
+ data.tar.gz: 6b32f79fcc8ef6cd0639d95a26d4737f95ae9e959b72bc7db553b35f56a76dcab073a6c110f09eb3d6948e74a8c738a7e682c827227f969f64871d0d301f6b60
data/README.md CHANGED
@@ -13,7 +13,7 @@ gem install runapi-flux-kontext
13
13
  ## Quick start
14
14
 
15
15
  ```ruby
16
- require "runapi-flux-kontext"
16
+ require "runapi/flux_kontext"
17
17
 
18
18
  client = RunApi::FluxKontext::Client.new
19
19
  task = client.text_to_image.create(
@@ -21,27 +21,27 @@ module RunApi
21
21
  #
22
22
  # @param params [Hash] generation parameters
23
23
  # @return [RunApi::FluxKontext::Types::CompletedTextToImageResponse] completed generation with images
24
- def run(**params)
25
- task = create(**params)
26
- poll_until_complete { get(task.id) }
24
+ def run(options: nil, **params)
25
+ task = create(options: options, **params)
26
+ poll_until_complete { get(task.id, options: options) }
27
27
  end
28
28
 
29
29
  # Create an image generation task.
30
30
  #
31
31
  # @param params [Hash] generation parameters
32
32
  # @return [RunApi::FluxKontext::Types::TextToImageResponse] task creation result with id
33
- def create(**params)
33
+ def create(options: nil, **params)
34
34
  params = compact_params(params)
35
35
  validate_contract!(CONTRACT["text-to-image"], params)
36
- request(:post, ENDPOINT, body: params)
36
+ request(:post, ENDPOINT, body: params, options: options)
37
37
  end
38
38
 
39
39
  # Get generation status by task ID.
40
40
  #
41
41
  # @param id [String] task ID
42
42
  # @return [RunApi::FluxKontext::Types::TextToImageResponse] current generation status
43
- def get(id)
44
- request(:get, "#{ENDPOINT}/#{id}")
43
+ def get(id, options: nil)
44
+ request(:get, "#{ENDPOINT}/#{id}", options: options)
45
45
  end
46
46
  end
47
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-flux-kontext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
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.2.7
18
+ version: 0.3.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.2.7
25
+ version: 0.3.0
26
26
  description: The Flux Kontext Ruby SDK is the language-specific package for Flux Kontext
27
27
  on RunAPI. Use this package for image generation, image editing, and creative production
28
28
  workflows when your application needs request bodies, task status lookup, and consistent
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  requirements: []
69
- rubygems_version: 4.0.10
69
+ rubygems_version: 4.0.17
70
70
  specification_version: 4
71
71
  summary: Flux Kontext Ruby SDK for RunAPI
72
72
  test_files: []