runapi-gpt-4o-image 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: 0bde0a1009adf492967f5a45e2f602da47664e435d83938704a262709c1bc8ea
4
- data.tar.gz: efe6d98d743b8801b266885e4bc57e21d838727547179d1dc20af0a324832908
3
+ metadata.gz: 80c53cf71c1f27be6db9925136010186ff37c9cb3a092e2c12c5f014ae4a6e74
4
+ data.tar.gz: 91255557086846908113fbd2fbdb6286b40a7db7cef87bc5832f8889af874997
5
5
  SHA512:
6
- metadata.gz: 61889c9a5c4c2fc6bdf33eeba1f76faeb171df8ff2343ca1c29cf51a5984aa3897e476f18cb28c59921096878261ae8547fb21518d9c99153a8036875655b951
7
- data.tar.gz: dd3efdf22b6f1e8e8ec7525d1b72a5a14d8b4ad2e5f71296aac2ffd8043d911b51f604b0c8dd434a2fbaab65b123406c0c11c11e8baadae035fb49f2cdfc7208
6
+ metadata.gz: 594b0b82913a4f50b2a9320d3d12a1b3f964c59fa3b81ebf71c331f421c0dd3bdcd1acf9f6594113e93f2a431d08c7271c95e483bb51071ba7700b95578184d6
7
+ data.tar.gz: af4865e4fef19595dc8c9545cfefedc4c1cea9e7db0d6206d958089c14008deda05ad310a8b6c5c670f15b383238d698513500ad9d17c46c9a755530b75c3c8f
data/README.md CHANGED
@@ -13,7 +13,7 @@ gem install runapi-gpt-4o-image
13
13
  ## Quick start
14
14
 
15
15
  ```ruby
16
- require "runapi-gpt-4o-image"
16
+ require "runapi/gpt_4o_image"
17
17
 
18
18
  client = RunApi::Gpt4oImage::Client.new
19
19
  task = client.text_to_image.create(
@@ -14,6 +14,9 @@ module RunApi
14
14
  "output_count" => {
15
15
  "enum" => [1, 2, 4],
16
16
  "type" => "integer"
17
+ },
18
+ "source_image_urls" => {
19
+ "max_items" => 5
17
20
  }
18
21
  }
19
22
  }
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-gpt-4o-image
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.2.14
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.2.14
26
26
  description: The GPT-4o Image Ruby SDK is the language-specific package for GPT-4o
27
27
  Image 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,