runapi-grok-imagine 0.2.9 → 0.2.11

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: 52bf921738a8782baf0e96db9dca31a022002cf2c6cb7f3e531e167a6762b9ed
4
- data.tar.gz: 795c796bf56361b2e9d12b527ec864128a1080e4d250c1b31087f5f397480825
3
+ metadata.gz: 74d29f9dbb98b214dbc277ccf351fdb3588be4767bcb04cfd5dc1e400591093c
4
+ data.tar.gz: def751a3227b6e4bd803fd9dd5a0ceab53480f23ced9c47e5ab53ad1f7cebdc3
5
5
  SHA512:
6
- metadata.gz: ad5eb5d48c9dc6b138bf8ee8015fc49f5524c950e299813aa320af9d884f41fa9acecac9c9e4c6475667dd5a3a517aaf0f376864dc06d98637f47529393f63a0
7
- data.tar.gz: abf3c13c706bef9faaa63a17a8546b0bc6b0c8cf63034b3204c3df1ae4f77693320787a91bd4d88a483e5cd233d628f6e95df083366752efcb68c4d6ca7ba3b5
6
+ metadata.gz: 4eee4c6fdbea70a5cf5238bebc4009a0d4a7525537eeda62d75cccdd5be2c000cbce2465533e5bd2de5eec314539d206c418831c6bb5e3e863f420e90c67f2b0
7
+ data.tar.gz: 4f1be7f7daa025d98a22fd9c744024bb5348e63ee34bdc2dc8b40fb93672e4f6e96b89d8f4d57126272253069886956a4adf23680e1645db9e4f78f183adcbd1
@@ -62,7 +62,7 @@ module RunApi
62
62
  "output_resolution" => {
63
63
  "enum" => ["480p", "720p"]
64
64
  },
65
- "source_image_urls" => {
65
+ "source_image_url" => {
66
66
  "required" => true
67
67
  }
68
68
  },
@@ -86,7 +86,7 @@ module RunApi
86
86
  "max" => 4096,
87
87
  "length" => true
88
88
  },
89
- "source_image_urls" => {
89
+ "source_image_url" => {
90
90
  "required" => true
91
91
  }
92
92
  }
@@ -4,7 +4,7 @@ module RunApi
4
4
  module GrokImagine
5
5
  module Resources
6
6
  # Grok-Imagine image-to-video generation resource.
7
- # Accepts either external source_image_urls or a prior text-to-image source_task_id (+ index).
7
+ # Accepts either an external source_image_url or a prior text-to-image source_task_id (+ index).
8
8
  class ImageToVideo
9
9
  include RunApi::Core::ResourceHelpers
10
10
 
@@ -37,17 +37,14 @@ module RunApi
37
37
  def validate_params!(params)
38
38
  validate_contract!(CONTRACT["image-to-video"], params)
39
39
 
40
- source_image_urls = param(params, :source_image_urls)
40
+ source_image_url = param(params, :source_image_url)
41
41
  source_task_id = param(params, :source_task_id)
42
42
 
43
- if source_image_urls && !source_image_urls.empty? && source_task_id
44
- raise Core::ValidationError, "Provide either source_image_urls or source_task_id, not both"
43
+ if source_image_url && source_task_id
44
+ raise Core::ValidationError, "Provide either source_image_url or source_task_id, not both"
45
45
  end
46
- if (!source_image_urls || source_image_urls.empty?) && !source_task_id
47
- raise Core::ValidationError, "One of source_image_urls or source_task_id is required"
48
- end
49
- if source_image_urls && source_image_urls.size > 1
50
- raise Core::ValidationError, "source_image_urls supports at most 1 entry"
46
+ unless source_image_url || source_task_id
47
+ raise Core::ValidationError, "One of source_image_url or source_task_id is required"
51
48
  end
52
49
 
53
50
  if source_task_id && (index = param(params, :index))
@@ -57,7 +54,7 @@ module RunApi
57
54
  end
58
55
  end
59
56
 
60
- if param(params, :motion_style).to_s == "spicy" && source_image_urls && !source_image_urls.empty?
57
+ if param(params, :motion_style).to_s == "spicy" && source_image_url
61
58
  raise Core::ValidationError, "spicy motion_style requires a source_task_id source image."
62
59
  end
63
60
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-grok-imagine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.11
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.12
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.12
25
+ version: 0.3.0
26
26
  description: The Grok Imagine Ruby SDK is the language-specific package for Grok Imagine
27
27
  on RunAPI. Use this package for image and video generation, image editing, and creative
28
28
  production workflows when your application needs request bodies, task status lookup,
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  requirements: []
74
- rubygems_version: 4.0.10
74
+ rubygems_version: 4.0.17
75
75
  specification_version: 4
76
76
  summary: Grok Imagine Ruby SDK for RunAPI
77
77
  test_files: []