imago 0.2.1 → 0.2.2
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/.rubocop.yml +4 -0
- data/lib/imago/providers/gemini.rb +11 -1
- data/lib/imago/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e60c91ea1180d1b06bb91773b1d67bfe8d8adbfabda855a702b4260e64c7be3e
|
|
4
|
+
data.tar.gz: 502c092d7658190fa88a32faf3e4f528187ae77ce1777d143c7079a4c47cfaa8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 61f09f390958a1e2b878be10748a76ef1559682f283d229bd1c508301daf680ec5541cc75f53af86a86bc9f92609789c28373378f322bcdfdd3d09380580cf7f
|
|
7
|
+
data.tar.gz: 6060353aa5cc5d06cea8e0abee4b2f10504a64bdfb6c406cf4ea3278feff354c35e06c7967bfe97d32d6fa8bd2945fadc7d7a625322bbe8d12e05735e47f641a
|
data/.rubocop.yml
CHANGED
|
@@ -88,7 +88,17 @@ module Imago
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
def build_generation_config(opts)
|
|
91
|
-
{ candidateCount: opts[:sample_count] || opts[:n], seed: opts[:seed]
|
|
91
|
+
config = { candidateCount: opts[:sample_count] || opts[:n], seed: opts[:seed] }.compact
|
|
92
|
+
config[:imageConfig] = build_image_config(opts) if image_config_present?(opts)
|
|
93
|
+
config
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def image_config_present?(opts)
|
|
97
|
+
opts[:aspect_ratio]
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def build_image_config(opts)
|
|
101
|
+
{ aspectRatio: opts[:aspect_ratio] }.compact
|
|
92
102
|
end
|
|
93
103
|
|
|
94
104
|
def fetch_models
|
data/lib/imago/version.rb
CHANGED