runapi-midjourney 0.3.2 → 0.5.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 +4 -4
- data/lib/runapi/midjourney/resources/edit_image.rb +0 -1
- data/lib/runapi/midjourney/resources/extend_video.rb +0 -1
- data/lib/runapi/midjourney/resources/get_seed.rb +6 -2
- data/lib/runapi/midjourney/resources/image_to_prompt.rb +6 -2
- data/lib/runapi/midjourney/resources/image_to_video.rb +0 -1
- data/lib/runapi/midjourney/resources/shorten_prompt.rb +6 -2
- data/lib/runapi/midjourney/resources/text_to_image.rb +0 -1
- data/lib/runapi/midjourney/types.rb +0 -3
- data/lib/runapi/midjourney.rb +0 -1
- metadata +4 -5
- data/lib/runapi/midjourney/contract_gen.rb +0 -84
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6a6639b87cc11fbaa97d19e7d5955b2de94c0bbba67acb017abdf38544ebbf91
|
|
4
|
+
data.tar.gz: 7aa5e123cb478318adedb0e17bc35c5e11e528254b51f393af5a03ee477a4aa6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 910a6ebe9d399d171874a65dbabfba06730f561de2848376e3b200436c7e0c4a97da4dd4cec95e4018947ca2ee7ae38104a123392654daf7a7d0bd7a9bfd36ab
|
|
7
|
+
data.tar.gz: 8fe21cf7e4e28cd4019f26b28212345e1be55023ac7e4c1f646f02790260aad6403d0778a9392b5aaf92f5c2192978cff56e4e371244ec81057f743f3f9a5740
|
|
@@ -14,8 +14,12 @@ module RunApi
|
|
|
14
14
|
|
|
15
15
|
def run(options: nil, **params)
|
|
16
16
|
params = compact_params(params)
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
run_hybrid(ENDPOINT, body: params, options: options, response_class: RESPONSE_CLASS)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def subscribe(options: nil, **params)
|
|
21
|
+
params = compact_params(params)
|
|
22
|
+
subscribe_hybrid(ENDPOINT, body: params, options: options, response_class: RESPONSE_CLASS)
|
|
19
23
|
end
|
|
20
24
|
end
|
|
21
25
|
end
|
|
@@ -14,8 +14,12 @@ module RunApi
|
|
|
14
14
|
|
|
15
15
|
def run(options: nil, **params)
|
|
16
16
|
params = compact_params(params)
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
run_hybrid(ENDPOINT, body: params, options: options, response_class: RESPONSE_CLASS)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def subscribe(options: nil, **params)
|
|
21
|
+
params = compact_params(params)
|
|
22
|
+
subscribe_hybrid(ENDPOINT, body: params, options: options, response_class: RESPONSE_CLASS)
|
|
19
23
|
end
|
|
20
24
|
end
|
|
21
25
|
end
|
|
@@ -14,8 +14,12 @@ module RunApi
|
|
|
14
14
|
|
|
15
15
|
def run(options: nil, **params)
|
|
16
16
|
params = compact_params(params)
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
run_hybrid(ENDPOINT, body: params, options: options, response_class: RESPONSE_CLASS)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def subscribe(options: nil, **params)
|
|
21
|
+
params = compact_params(params)
|
|
22
|
+
subscribe_hybrid(ENDPOINT, body: params, options: options, response_class: RESPONSE_CLASS)
|
|
19
23
|
end
|
|
20
24
|
end
|
|
21
25
|
end
|
|
@@ -43,21 +43,18 @@ module RunApi
|
|
|
43
43
|
class ImageToPromptResponse < RunApi::Core::BaseModel
|
|
44
44
|
required :prompts, [String]
|
|
45
45
|
optional :error, String
|
|
46
|
-
optional :billing, RunApi::Core::TaskBillingFacts
|
|
47
46
|
end
|
|
48
47
|
|
|
49
48
|
# Concise suggestions derived from a prompt.
|
|
50
49
|
class ShortenPromptResponse < RunApi::Core::BaseModel
|
|
51
50
|
required :prompts, [String]
|
|
52
51
|
optional :error, String
|
|
53
|
-
optional :billing, RunApi::Core::TaskBillingFacts
|
|
54
52
|
end
|
|
55
53
|
|
|
56
54
|
# Seed associated with a generated image.
|
|
57
55
|
class GetSeedResponse < RunApi::Core::BaseModel
|
|
58
56
|
optional :seed, Integer
|
|
59
57
|
optional :error, String
|
|
60
|
-
optional :billing, RunApi::Core::TaskBillingFacts
|
|
61
58
|
end
|
|
62
59
|
end
|
|
63
60
|
end
|
data/lib/runapi/midjourney.rb
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require "runapi/core"
|
|
4
4
|
require_relative "midjourney/types"
|
|
5
|
-
require_relative "midjourney/contract_gen"
|
|
6
5
|
require_relative "midjourney/resources/text_to_image"
|
|
7
6
|
require_relative "midjourney/resources/edit_image"
|
|
8
7
|
require_relative "midjourney/resources/image_to_video"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: runapi-midjourney
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.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.
|
|
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.
|
|
25
|
+
version: 0.6.0
|
|
26
26
|
description: Use `runapi-midjourney` for Midjourney image generation, editing, image-to-video,
|
|
27
27
|
first-video extension, image-to-prompt, prompt shortening, and seed lookup in Ruby
|
|
28
28
|
applications and workers.
|
|
@@ -38,7 +38,6 @@ files:
|
|
|
38
38
|
- lib/runapi-midjourney.rb
|
|
39
39
|
- lib/runapi/midjourney.rb
|
|
40
40
|
- lib/runapi/midjourney/client.rb
|
|
41
|
-
- lib/runapi/midjourney/contract_gen.rb
|
|
42
41
|
- lib/runapi/midjourney/resources/edit_image.rb
|
|
43
42
|
- lib/runapi/midjourney/resources/extend_video.rb
|
|
44
43
|
- lib/runapi/midjourney/resources/get_seed.rb
|
|
@@ -71,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
71
70
|
- !ruby/object:Gem::Version
|
|
72
71
|
version: '0'
|
|
73
72
|
requirements: []
|
|
74
|
-
rubygems_version:
|
|
73
|
+
rubygems_version: 3.6.9
|
|
75
74
|
specification_version: 4
|
|
76
75
|
summary: Midjourney Ruby SDK for RunAPI
|
|
77
76
|
test_files: []
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module RunApi
|
|
4
|
-
module Midjourney
|
|
5
|
-
CONTRACT = {
|
|
6
|
-
"edit-image" => {
|
|
7
|
-
"models" => ["midjourney-edit-image"],
|
|
8
|
-
"fields_by_model" => {
|
|
9
|
-
"midjourney-edit-image" => {
|
|
10
|
-
"prompt" => {
|
|
11
|
-
"required" => true
|
|
12
|
-
},
|
|
13
|
-
"source_image_url" => {
|
|
14
|
-
"required" => true
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"extend-video" => {
|
|
20
|
-
"models" => ["midjourney-image-to-video"],
|
|
21
|
-
"fields_by_model" => {
|
|
22
|
-
"midjourney-image-to-video" => {
|
|
23
|
-
"source_task_id" => {
|
|
24
|
-
"required" => true
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"get-seed" => {
|
|
30
|
-
"models" => [],
|
|
31
|
-
"fields_by_model" => {
|
|
32
|
-
"_" => {
|
|
33
|
-
"image_id" => {
|
|
34
|
-
"required" => true
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"image-to-prompt" => {
|
|
40
|
-
"models" => [],
|
|
41
|
-
"fields_by_model" => {
|
|
42
|
-
"_" => {
|
|
43
|
-
"source_image_url" => {
|
|
44
|
-
"required" => true
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"image-to-video" => {
|
|
50
|
-
"models" => ["midjourney-image-to-video"],
|
|
51
|
-
"fields_by_model" => {
|
|
52
|
-
"midjourney-image-to-video" => {
|
|
53
|
-
"output_resolution" => {
|
|
54
|
-
"enum" => ["480p"]
|
|
55
|
-
},
|
|
56
|
-
"source_image_url" => {
|
|
57
|
-
"required" => true
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"shorten-prompt" => {
|
|
63
|
-
"models" => [],
|
|
64
|
-
"fields_by_model" => {
|
|
65
|
-
"_" => {
|
|
66
|
-
"prompt" => {
|
|
67
|
-
"required" => true
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"text-to-image" => {
|
|
73
|
-
"models" => ["midjourney-v8.1"],
|
|
74
|
-
"fields_by_model" => {
|
|
75
|
-
"midjourney-v8.1" => {
|
|
76
|
-
"prompt" => {
|
|
77
|
-
"required" => true
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}.freeze
|
|
83
|
-
end
|
|
84
|
-
end
|