stability_sdk 0.2.2 → 0.2.4

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: b3c239513021649189e56964b9accdf59e00760ef106b691dd87a70d2715b357
4
- data.tar.gz: 2acd179cffb5a3d583bc132c2769b83fcb93e159a02c37246c97f240f08f5026
3
+ metadata.gz: ef7bdad79d5b8b0a6be79a50f2a26d66fa3f907a1035be4fe3b26512bb2d5f95
4
+ data.tar.gz: 618fa88c26a36f52b5e6a4f75bd46b7060b09e2e85e49dc13a802c3139ed8277
5
5
  SHA512:
6
- metadata.gz: 67e17b02652f760974041c5404ff6a6f2a8fdde7f812ff9d2219893733c5898f8d255873fccafdbb287ce1f41e77e063bdcf29a7c66ad356f0350f76c719c95a
7
- data.tar.gz: 18cc7f68fb359296471d5d3257438ebd079b088f010667986dbc8878ee7c1a29cf95a9e7cbbeb008553439e04a38c2714d524c033b5dadfcfcccb18ff41de201
6
+ metadata.gz: cff3f2786098d254d5c24f263895bcfeac39e1e07e1d50a041cae5cdf95d8b80e07a1294f1d43211fc304a05fc15f890b2542d5a0f1c0198626053c76a5f9f07
7
+ data.tar.gz: a15e2e10665fd4fed95f5417633a53c6f6c5f55caeeb5d40f8eb7239c66d3b922d99880685d9debb376895989478a46bd4f6ad0c1eccf8d5446a072e3f0e1566
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stability_sdk (0.2.2)
4
+ stability_sdk (0.2.4)
5
5
  grpc (>= 1.0.0)
6
6
  mime-types (>= 3.0.0)
7
7
 
data/README.md CHANGED
@@ -19,8 +19,7 @@ Or install it yourself as:
19
19
  $ gem install stability_sdk
20
20
 
21
21
  ## Usage
22
-
23
- First you need to create a [DreamStudio](https://beta.dreamstudio.ai/home)'s account and get an API Key of it.
22
+ First, you need to create a [DreamStudio](https://beta.dreamstudio.ai/home)'s account and get an API Key of it.
24
23
 
25
24
  - Access [DreamStudio](https://beta.dreamstudio.ai/dream) and create an account if you have not had it
26
25
  - Go to the [membership page](https://beta.dreamstudio.ai/membership)
@@ -72,7 +71,7 @@ This sample code saves a generated image as `result.png`.
72
71
  ```ruby
73
72
  require "stability_sdk"
74
73
 
75
- client = StabilitySDK::Client.new(api_key: "YOUR_API_KEY")
74
+ client = StabilitySDK::Client.new(api_key: "YOUR_API_KEY", timeout: 600)
76
75
 
77
76
  prompt = "your prompot here"
78
77
  options = {}
@@ -31,7 +31,12 @@ module StabilitySDK
31
31
  call_creds = GRPC::Core::CallCredentials.new(proc { { "authorization" => "Bearer #{options[:api_key]}" } })
32
32
  creds = channel_creds.compose(call_creds)
33
33
 
34
- @stub = Gooseai::GenerationService::Stub.new(host, creds)
34
+ stub_params = {}
35
+ [:channel_override, :timeout, :propagate_mask, :channel_args, :interceptors].each do |kw|
36
+ stub_params[kw] = options[kw] if options.has_key?(kw)
37
+ end
38
+
39
+ @stub = Gooseai::GenerationService::Stub.new(host, creds, **stub_params)
35
40
  end
36
41
 
37
42
  def generate(prompt, options, &block)
@@ -1,3 +1,3 @@
1
1
  module StabilitySDK
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stability_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosei Moriyama
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-27 00:00:00.000000000 Z
11
+ date: 2022-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc