runapi-imagen-4 0.2.12 → 0.3.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: 7e0e6edf7b0f07ade1a3d07b366dc9856c19eabd1a028e0e45df2d6806754333
4
- data.tar.gz: 248bff10c12b8912e0763ff5a04f80b9fe7a096fad68e7910b49211096ff15b4
3
+ metadata.gz: ccaa17397f98c9fa5e51b9053ce4fe8294d8ac28d2becaaa379cbeab72d0f5b9
4
+ data.tar.gz: 90fee0985d4c560fcd495cb35235f1f7f42c9ee342d9816010b819494417937a
5
5
  SHA512:
6
- metadata.gz: e8ad89bf2d3081dcfcea1e72dc37b416eae21661052bef3bfa0988b7cbbe77d236a902a7a505ae4d0c222ed9af9f670f0345a27706efc4d276efc24783cb7e8f
7
- data.tar.gz: 063ec7af1482e6deee48e001407ca487ef107e545a5dea0b38c3a12fb7e52ca2d88e60534628d4e9d979f7e4b019b2310ad25c0068579b89d1b65c62ec2d8340
6
+ metadata.gz: ba2fee60d7e213c596cd3b7ea571826085bf778211bcf7b9036ea63246ffc762ac5f39474f47be1f2c2048b4fb148cf1536d86dd0d3c2446a04411090488017a
7
+ data.tar.gz: f45b3808fd4f816b5b2ad74b94ddc849bdd7411ca7e50c573922dd1b8d5b795b42068686690582998096bac1c2e9bfc0c73d951971a18d2e85b790eea2c83ab4
@@ -23,21 +23,12 @@ module RunApi
23
23
 
24
24
  def create(options: nil, **params)
25
25
  params = compact_params(params)
26
- validate_params!(params)
27
26
  request(:post, ENDPOINT, body: params, options: options)
28
27
  end
29
28
 
30
29
  def get(id, options: nil)
31
30
  request(:get, "#{ENDPOINT}/#{id}", options: options)
32
31
  end
33
-
34
- private
35
-
36
- def validate_params!(params)
37
- validate_contract!(CONTRACT["remix-image"], params)
38
-
39
- raise Core::ValidationError, "prompt is required" unless param(params, :prompt)
40
- end
41
32
  end
42
33
  end
43
34
  end
@@ -23,21 +23,12 @@ module RunApi
23
23
 
24
24
  def create(options: nil, **params)
25
25
  params = compact_params(params)
26
- validate_params!(params)
27
26
  request(:post, ENDPOINT, body: params, options: options)
28
27
  end
29
28
 
30
29
  def get(id, options: nil)
31
30
  request(:get, "#{ENDPOINT}/#{id}", options: options)
32
31
  end
33
-
34
- private
35
-
36
- def validate_params!(params)
37
- validate_contract!(CONTRACT["text-to-image"], params)
38
-
39
- raise Core::ValidationError, "prompt is required" unless param(params, :prompt)
40
- end
41
32
  end
42
33
  end
43
34
  end
@@ -2,7 +2,6 @@
2
2
 
3
3
  require "runapi/core"
4
4
  require_relative "imagen_4/types"
5
- require_relative "imagen_4/contract_gen"
6
5
  require_relative "imagen_4/resources/text_to_image"
7
6
  require_relative "imagen_4/resources/remix_image"
8
7
  require_relative "imagen_4/client"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-imagen-4
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.3.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 Imagen 4 Ruby SDK is the language-specific package for Imagen 4 on
27
27
  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
@@ -39,7 +39,6 @@ files:
39
39
  - lib/runapi-imagen_4.rb
40
40
  - lib/runapi/imagen_4.rb
41
41
  - lib/runapi/imagen_4/client.rb
42
- - lib/runapi/imagen_4/contract_gen.rb
43
42
  - lib/runapi/imagen_4/resources/remix_image.rb
44
43
  - lib/runapi/imagen_4/resources/text_to_image.rb
45
44
  - lib/runapi/imagen_4/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: Imagen 4 API Ruby SDK for RunAPI
73
72
  test_files: []
@@ -1,58 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RunApi
4
- module Imagen4
5
- CONTRACT = {
6
- "remix-image" => {
7
- "models" => ["imagen-4-pro-remix-image"],
8
- "fields_by_model" => {
9
- "imagen-4-pro-remix-image" => {
10
- "aspect_ratio" => {
11
- "enum" => ["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9", "auto"]
12
- },
13
- "output_format" => {
14
- "enum" => ["png", "jpg"]
15
- },
16
- "output_resolution" => {
17
- "enum" => ["1k", "2k", "4k"]
18
- },
19
- "source_image_urls" => {
20
- "required" => true,
21
- "min_items" => 1,
22
- "max_items" => 8
23
- }
24
- }
25
- }
26
- },
27
- "text-to-image" => {
28
- "models" => ["imagen-4", "imagen-4-fast", "imagen-4-ultra"],
29
- "fields_by_model" => {
30
- "imagen-4" => {
31
- "aspect_ratio" => {
32
- "enum" => ["1:1", "16:9", "9:16", "3:4", "4:3"]
33
- },
34
- "seed" => {
35
- "type" => "integer"
36
- }
37
- },
38
- "imagen-4-fast" => {
39
- "aspect_ratio" => {
40
- "enum" => ["1:1", "16:9", "9:16", "3:4", "4:3", "auto"]
41
- },
42
- "seed" => {
43
- "type" => "integer"
44
- }
45
- },
46
- "imagen-4-ultra" => {
47
- "aspect_ratio" => {
48
- "enum" => ["1:1", "16:9", "9:16", "3:4", "4:3"]
49
- },
50
- "seed" => {
51
- "type" => "integer"
52
- }
53
- }
54
- }
55
- }
56
- }.freeze
57
- end
58
- end