runapi-gpt-image-2 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: e679c62e55353ec2c36187098975de7770b69c8407f994aacdb5ea17a794c351
4
- data.tar.gz: 9286a4d151ae82e9df3b045f1c241b4c738bac936c550c8bcfc4b9cf3b2e5d67
3
+ metadata.gz: 051a5f67d1a148c3b79ba4bd2d0f69dcb3d1edab9fa86c4b88673a07486cc06a
4
+ data.tar.gz: 28c1a5c6bde7dfe701483a93c6bc9f702fd71408eb0ed9c3c2c6432b49df14ba
5
5
  SHA512:
6
- metadata.gz: eb53d80ad81e29e7339bfb845b78fb50f9554d62473559609999deac7c2f55ecebb5041ce296cafe7db807dfd9dab2c8463baaeb35a5b372a27e6b6dfefd29c8
7
- data.tar.gz: 3685800e58e240512d0533f895ede39d1445c2f00971442aa6000e6b1f3d7ee8c21a2289bec4a49955b81706cd3a33b6f82802859be7fbec8ed47e4e81de014e
6
+ metadata.gz: aec4ca4e85f9451e637711f603aa32c6a1cc3120ee654a8b28f8e99db2545afc6c0b8278005b03b4e082ac69817e0c43c32227c39b88324f3c64ce54b4f628c4
7
+ data.tar.gz: de48904502d61d31ffbf7181ba84880cf6701aebf1701ea7d0e5553289f7a8fdee002bf479762c6f7614c040429997b05850f973ad47adf119479c6ca33e16c7
data/README.md CHANGED
@@ -13,7 +13,7 @@ gem install runapi-gpt-image-2
13
13
  ## Quick start
14
14
 
15
15
  ```ruby
16
- require "runapi-gpt-image-2"
16
+ require "runapi/gpt_image_2"
17
17
 
18
18
  client = RunApi::GptImage2::Client.new
19
19
  task = client.text_to_image.create(
@@ -17,19 +17,19 @@ module RunApi
17
17
  @http = http
18
18
  end
19
19
 
20
- def run(**params)
21
- task = create(**params)
22
- poll_until_complete { get(task.id) }
20
+ def run(options: nil, **params)
21
+ task = create(options: options, **params)
22
+ poll_until_complete { get(task.id, options: options) }
23
23
  end
24
24
 
25
- def create(**params)
25
+ def create(options: nil, **params)
26
26
  params = compact_params(params)
27
27
  validate_contract!(CONTRACT["edit-image"], params)
28
- request(:post, ENDPOINT, body: params)
28
+ request(:post, ENDPOINT, body: params, options: options)
29
29
  end
30
30
 
31
- def get(id)
32
- request(:get, "#{ENDPOINT}/#{id}")
31
+ def get(id, options: nil)
32
+ request(:get, "#{ENDPOINT}/#{id}", options: options)
33
33
  end
34
34
  end
35
35
  end
@@ -17,19 +17,19 @@ module RunApi
17
17
  @http = http
18
18
  end
19
19
 
20
- def run(**params)
21
- task = create(**params)
22
- poll_until_complete { get(task.id) }
20
+ def run(options: nil, **params)
21
+ task = create(options: options, **params)
22
+ poll_until_complete { get(task.id, options: options) }
23
23
  end
24
24
 
25
- def create(**params)
25
+ def create(options: nil, **params)
26
26
  params = compact_params(params)
27
27
  validate_contract!(CONTRACT["text-to-image"], params)
28
- request(:post, ENDPOINT, body: params)
28
+ request(:post, ENDPOINT, body: params, options: options)
29
29
  end
30
30
 
31
- def get(id)
32
- request(:get, "#{ENDPOINT}/#{id}")
31
+ def get(id, options: nil)
32
+ request(:get, "#{ENDPOINT}/#{id}", options: options)
33
33
  end
34
34
  end
35
35
  end
@@ -13,6 +13,7 @@ module RunApi
13
13
  class TextToImageResponse < RunApi::Core::TaskResponse
14
14
  required :id, String
15
15
  optional :status, String, enum: -> { RunApi::Core::TaskResponse::Status::ALL }
16
+ optional :task_replayed
16
17
  optional :images, [-> { Image }]
17
18
  optional :error, String
18
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-gpt-image-2
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 GPT Image 2 Ruby SDK is the language-specific package for GPT Image
27
27
  2 on RunAPI. Use this package for image generation, image editing, and creative
28
28
  production workflows when your application needs request bodies, task status lookup,
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  requirements: []
70
- rubygems_version: 4.0.10
70
+ rubygems_version: 4.0.17
71
71
  specification_version: 4
72
72
  summary: GPT Image 2 Ruby SDK for RunAPI
73
73
  test_files: []