replicate-client 0.1.2 → 0.1.3

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: f52df5f5238a476baf9e3927913349bc9a331374dcbdd34024d4a133a962c48c
4
- data.tar.gz: d640caa759a841a173cccdb6309377375e78b9c2fc77bba3d9894ef42701ef70
3
+ metadata.gz: efa5152767827d0b6d95d1b83cf211c9dfb82d11885401c74394d6dbd068949e
4
+ data.tar.gz: '040619b058d796d577bb7d1b75e21d84af4e1999b3ccebcc5b168ba5469241f6'
5
5
  SHA512:
6
- metadata.gz: 0b0883674e776e744ae3af6c1cfa5dd5dc6dcc472e5635ecafce1dc2c1a73251f3803921fb5b6ee7ef3557650e2604b5487f2a3d94bf597d07649f475596b371
7
- data.tar.gz: d9cc6a9d6cb19efd0ecf7ae5aad3568282e37cbc1c3981d1718559398211c493fa6e23f2fd120c19e94a157fd6ecd7b331ee5ecf1b4be5490d8672db646f70cc
6
+ metadata.gz: 706867512328515a36e3af092bdd9bfb39a633e476cd37b7c4afc9f3e492be7f427c61eedc58e4ccaa85f151c5a4e17291bdcbbe1e7dc5a627c366c85dbf3125
7
+ data.tar.gz: 9a0c11660772e9f85f2e59676ce854cf9e2f4d79e2d8d701d6df6340bed17484a0297a13d1115eaed5d2b10a815be06d41feed24dce049ebdb7f2afd89ed6930
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- replicate-client (0.1.0)
4
+ replicate-client (0.1.3)
5
5
  faraday (>= 1)
6
6
 
7
7
  GEM
@@ -36,8 +36,6 @@ module ReplicateClient
36
36
  #
37
37
  # @return [Hash] The response from the API.
38
38
  def get(path)
39
- puts "GET #{path}"
40
-
41
39
  response = connection.get(build_url(path)) do |request|
42
40
  request.headers["Authorization"] = "Bearer #{@configuration.access_token}"
43
41
  request.headers["Content-Type"] = "application/json"
@@ -281,7 +281,7 @@ module ReplicateClient
281
281
  # @return [void]
282
282
  def reload!
283
283
  attributes = ReplicateClient.client.get(path)
284
- reset_attributes(attributes)
284
+ reset_attributes(attributes, version_id: version_id)
285
285
  end
286
286
 
287
287
  # Check if the model is public.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReplicateClient
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ReplicateClient
4
+ class Webhook
5
+ module Event
6
+ OUTPUT = "output"
7
+ START = "start"
8
+ LOGS = "logs"
9
+ COMPLETED = "completed"
10
+ end
11
+ end
12
+ end
@@ -10,6 +10,7 @@ require_relative "replicate-client/model"
10
10
  require_relative "replicate-client/hardware"
11
11
  require_relative "replicate-client/training"
12
12
  require_relative "replicate-client/deployment"
13
+ require_relative "replicate-client/webhook"
13
14
 
14
15
  module ReplicateClient
15
16
  class Error < StandardError; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: replicate-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Player
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-22 00:00:00.000000000 Z
11
+ date: 2024-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -46,6 +46,7 @@ files:
46
46
  - lib/replicate-client/prediction.rb
47
47
  - lib/replicate-client/training.rb
48
48
  - lib/replicate-client/version.rb
49
+ - lib/replicate-client/webhook.rb
49
50
  homepage: https://github.com/851-labs/replicate
50
51
  licenses:
51
52
  - MIT