weaviate-ruby 0.8.9 → 0.8.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8289cf9c5b37631db1c1d0607f0e2820477e8edb637b34a3efbef8bc80af80bf
4
- data.tar.gz: 7423bff81c02baad908512e0818abc43fbbcc3d0204b4ada1c2f978493349737
3
+ metadata.gz: 78db75797066d9789e8c9da6e48aeb031f71f8d47709b87b08ce5caac3b3e04b
4
+ data.tar.gz: 96f9491d8ea9970cb2b2e0a1b5935b66ff63c18629055b5b08de9a9967167387
5
5
  SHA512:
6
- metadata.gz: 4887f5222fbb592df702fbc2a6907f5513285143c4b3bb838486120045de58a2d866554d340ed098a9c3edb6a090e96e941f879e27c3bfa9654aa39ed5afcc78
7
- data.tar.gz: a708d38650a8e83e94bd660b2a34860488e0e123eb3e69c6afc868b832e69a6c352468d30d1b101b0ed757d855420a40651d16bc7da08e8adac151fbd6690f7c
6
+ metadata.gz: 621fb1ba1685ac3c934e545732184b10509dc4366089cc8d6e985dbfe49144aa82894e78281c0761857999b920b549a1ccc3da863f3a85d3843e9c2cdeef0128
7
+ data.tar.gz: 17b5588cddb8ada1fd1ebe0e8bd877d74ca637a9756f686418c6a751504ef3b54369ed7c0a2ee319802d72b87329108a018ed1b5041af2103f6511438fa03170
data/Gemfile CHANGED
@@ -9,3 +9,4 @@ gem "rake", "~> 13.0"
9
9
 
10
10
  gem "rspec", "~> 3.0"
11
11
  gem "standard", "~> 1.25.0"
12
+ gem "graphql-client", "~> 0.19.0"
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- weaviate-ruby (0.8.9)
4
+ weaviate-ruby (0.8.10)
5
5
  faraday (>= 2.0.1, < 3.0)
6
6
  graphlient (~> 0.7.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (7.1.0)
11
+ activesupport (7.1.3)
12
12
  base64
13
13
  bigdecimal
14
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -19,14 +19,14 @@ GEM
19
19
  mutex_m
20
20
  tzinfo (~> 2.0)
21
21
  ast (2.4.2)
22
- base64 (0.1.1)
23
- bigdecimal (3.1.4)
22
+ base64 (0.2.0)
23
+ bigdecimal (3.1.6)
24
24
  byebug (11.1.3)
25
25
  coderay (1.1.3)
26
- concurrent-ruby (1.2.2)
26
+ concurrent-ruby (1.2.3)
27
27
  connection_pool (2.4.1)
28
28
  diff-lcs (1.5.0)
29
- drb (2.1.1)
29
+ drb (2.2.0)
30
30
  ruby2_keywords
31
31
  faraday (2.7.10)
32
32
  faraday-net_http (>= 2.0, < 3.1)
@@ -35,8 +35,9 @@ GEM
35
35
  graphlient (0.7.0)
36
36
  faraday (~> 2.0)
37
37
  graphql-client
38
- graphql (2.1.1)
39
- graphql-client (0.18.0)
38
+ graphql (2.2.6)
39
+ racc (~> 1.4)
40
+ graphql-client (0.19.0)
40
41
  activesupport (>= 3.0)
41
42
  graphql
42
43
  i18n (1.14.1)
@@ -44,8 +45,8 @@ GEM
44
45
  json (2.6.3)
45
46
  language_server-protocol (3.17.0.3)
46
47
  method_source (1.0.0)
47
- minitest (5.20.0)
48
- mutex_m (0.1.2)
48
+ minitest (5.21.2)
49
+ mutex_m (0.2.0)
49
50
  parallel (1.22.1)
50
51
  parser (3.2.1.1)
51
52
  ast (~> 2.4.1)
@@ -55,6 +56,7 @@ GEM
55
56
  pry-byebug (3.10.1)
56
57
  byebug (~> 11.0)
57
58
  pry (>= 0.13, < 0.15)
59
+ racc (1.7.3)
58
60
  rainbow (3.1.1)
59
61
  rake (13.0.6)
60
62
  rdiscount (2.2.7.1)
@@ -101,11 +103,13 @@ GEM
101
103
 
102
104
  PLATFORMS
103
105
  arm64-darwin-21
106
+ arm64-darwin-23
104
107
  x86_64-darwin-19
105
108
  x86_64-darwin-21
106
109
  x86_64-linux
107
110
 
108
111
  DEPENDENCIES
112
+ graphql-client (~> 0.19.0)
109
113
  pry-byebug (~> 3.9)
110
114
  rake (~> 13.0)
111
115
  rdiscount
@@ -61,13 +61,15 @@ module Weaviate
61
61
  # Batch create objects
62
62
  def batch_create(
63
63
  objects:,
64
- consistency_level: nil
64
+ consistency_level: nil,
65
+ tenant: nil
65
66
  )
66
67
  validate_consistency_level!(consistency_level) unless consistency_level.nil?
67
68
 
68
69
  response = client.connection.post("batch/#{PATH}") do |req|
69
70
  req.params["consistency_level"] = consistency_level.to_s.upcase unless consistency_level.nil?
70
71
  req.body = {objects: objects}
72
+ req.body["tenant"] = tenant unless tenant.nil?
71
73
  end
72
74
 
73
75
  response.body
@@ -78,12 +80,14 @@ module Weaviate
78
80
  class_name:,
79
81
  id:,
80
82
  include: nil,
81
- consistency_level: nil
83
+ consistency_level: nil,
84
+ tenant: nil
82
85
  )
83
86
  validate_consistency_level!(consistency_level) unless consistency_level.nil?
84
87
 
85
88
  response = client.connection.get("#{PATH}/#{class_name}/#{id}") do |req|
86
89
  req.params["consistency_level"] = consistency_level.to_s.upcase unless consistency_level.nil?
90
+ req.params["tenant"] = tenant unless tenant.nil?
87
91
  req.params["include"] = include unless include.nil?
88
92
  end
89
93
 
@@ -94,12 +98,14 @@ module Weaviate
94
98
  def exists?(
95
99
  class_name:,
96
100
  id:,
97
- consistency_level: nil
101
+ consistency_level: nil,
102
+ tenant: nil
98
103
  )
99
104
  validate_consistency_level!(consistency_level) unless consistency_level.nil?
100
105
 
101
106
  response = client.connection.head("#{PATH}/#{class_name}/#{id}") do |req|
102
107
  req.params["consistency_level"] = consistency_level.to_s.upcase unless consistency_level.nil?
108
+ req.params["tenant"] = tenant unless tenant.nil?
103
109
  end
104
110
 
105
111
  response.status == 204
@@ -111,6 +117,7 @@ module Weaviate
111
117
  id:,
112
118
  properties:,
113
119
  vector: nil,
120
+ tenant: nil,
114
121
  consistency_level: nil
115
122
  )
116
123
  validate_consistency_level!(consistency_level) unless consistency_level.nil?
@@ -123,6 +130,7 @@ module Weaviate
123
130
  req.body["class"] = class_name
124
131
  req.body["properties"] = properties
125
132
  req.body["vector"] = vector unless vector.nil?
133
+ req.body["tenant"] = tenant unless tenant.nil?
126
134
  end
127
135
 
128
136
  response.body
@@ -132,12 +140,14 @@ module Weaviate
132
140
  def delete(
133
141
  class_name:,
134
142
  id:,
135
- consistency_level: nil
143
+ consistency_level: nil,
144
+ tenant: nil
136
145
  )
137
146
  validate_consistency_level!(consistency_level) unless consistency_level.nil?
138
147
 
139
148
  response = client.connection.delete("#{PATH}/#{class_name}/#{id}") do |req|
140
149
  req.params["consistency_level"] = consistency_level.to_s.upcase unless consistency_level.nil?
150
+ req.params["tenant"] = tenant unless tenant.nil?
141
151
  end
142
152
 
143
153
  if response.success?
@@ -164,7 +164,7 @@ module Weaviate
164
164
  limit: $limit,
165
165
  offset: $offset,
166
166
  #{(!autocut.nil?) ? "autocut: #{autocut}" : ""},
167
- #{(!tenant.nil?) ? "tenant: #{tenant}" : ""},
167
+ #{(!tenant.nil?) ? "tenant: \"#{tenant}\"" : ""},
168
168
  #{(!near_text.nil?) ? "nearText: #{near_text}" : ""},
169
169
  #{(!near_vector.nil?) ? "nearVector: #{near_vector}" : ""},
170
170
  #{(!near_image.nil?) ? "nearImage: #{near_image}" : ""},
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Weaviate
4
- VERSION = "0.8.9"
4
+ VERSION = "0.8.10"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weaviate-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.9
4
+ version: 0.8.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Bondarev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-10 00:00:00.000000000 Z
11
+ date: 2024-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubygems_version: 3.2.3
141
+ rubygems_version: 3.4.1
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: Ruby wrapper for the Weaviate.io API