replicate-ruby 0.1.4 → 0.1.6
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/Gemfile.lock +2 -2
- data/lib/replicate/client/prediction.rb +1 -0
- data/lib/replicate/configurable.rb +2 -2
- data/lib/replicate/record/prediction.rb +9 -0
- data/lib/replicate/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1c51346f40acaa0f9e2f0c1ac97630fa2908d5e87d94de2d27196f2b33ec6135
|
|
4
|
+
data.tar.gz: 7559f35badbfd904058c70f3561d45793b6f3290e2905500902b755d2c45aeb2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb6c205ce5e7cd48decf8ea79067fe4eaa6942ee00c50b85a8efb82d549ae2deec969591b8ddee302b424d583d5e20f3d2c9f860e10bde8d51d633b6c9564036
|
|
7
|
+
data.tar.gz: 6d4255676a72b959ddb9ba3280adf181e6e6bbdd9012ac0085e0173bedb63e97a3458f2e8201dd22854fda4f10967ecb075f428759b67b31fd9550ad689e0fba
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
replicate-ruby (0.1.
|
|
4
|
+
replicate-ruby (0.1.6)
|
|
5
5
|
addressable
|
|
6
6
|
faraday (>= 2.0)
|
|
7
7
|
faraday-retry
|
|
@@ -15,7 +15,7 @@ GEM
|
|
|
15
15
|
coderay (1.1.3)
|
|
16
16
|
crack (0.4.5)
|
|
17
17
|
rexml
|
|
18
|
-
faraday (2.7.
|
|
18
|
+
faraday (2.7.2)
|
|
19
19
|
faraday-net_http (>= 2.0, < 3.1)
|
|
20
20
|
ruby2_keywords (>= 0.0.4)
|
|
21
21
|
faraday-net_http (3.0.2)
|
|
@@ -21,6 +21,7 @@ module Replicate
|
|
|
21
21
|
# Create a prediction
|
|
22
22
|
# @see https://replicate.com/docs/reference/http#create-prediction
|
|
23
23
|
def create_prediction(params)
|
|
24
|
+
params[:webhook_completed] ||= webhook_url
|
|
24
25
|
Replicate::Record::Prediction.new(self, post("predictions", params))
|
|
25
26
|
end
|
|
26
27
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module Replicate
|
|
4
4
|
module Configurable
|
|
5
|
-
attr_accessor :api_token
|
|
5
|
+
attr_accessor :api_token, :webhook_url
|
|
6
6
|
attr_writer :api_endpoint
|
|
7
7
|
|
|
8
8
|
class << self
|
|
9
9
|
# List of configurable keys for {Datatrans::Client}
|
|
10
10
|
# @return [Array] of option keys
|
|
11
11
|
def keys
|
|
12
|
-
@keys ||= %i[api_token api_endpoint]
|
|
12
|
+
@keys ||= %i[api_token api_endpoint webhook_url]
|
|
13
13
|
end
|
|
14
14
|
end
|
|
15
15
|
|
data/lib/replicate/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: replicate-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dreaming Tulpa
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-12-
|
|
11
|
+
date: 2022-12-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|