weaviate-ruby 0.7.1 → 0.7.3

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: fb982e0efa4f7af24b5e5ddc344da70ada13abaf498c2b2cc23eabb0659a78f6
4
- data.tar.gz: cb1caf49e8e3585f95f7a43d5b6c02acbfe52c4095c3594bd98ba3becc489c09
3
+ metadata.gz: 8565b08277a636e7d6ff9897060d1dafd4cb97292077f1b8f0ade8cc87ac019f
4
+ data.tar.gz: 960edbba086f83764c23d81b430931d9a4b3597f2fdd09a90d4f70552262d276
5
5
  SHA512:
6
- metadata.gz: 9ee15a3b1c4b1a8df15e836e82073310911f7ccb298c49f44cc290533ce407ae5e7410b50424455ac228348ccd2c36b7adc693ffac668876e2af6306b6d7d28e
7
- data.tar.gz: f9cae1a701db54b908409f1e631d7d1103e6ebef16949d273e565f994bb7eb5cae863372b1141a9646d2509c7b5570a88031855bfa8c4f88a39e71c8c0f70610
6
+ metadata.gz: f379f83adba19db042892faf35132c7a1f500653007e3627eedb07697916bb9720b136b8e72137fb22e738a974ec6d6e5249aee6620954e268ebc5a3fb151289
7
+ data.tar.gz: ea3bff55f289ac6fbf41a183248538c64b9d5534258507bf392c330248f618417ff897efb9b5724a294285d797cdec30444009aa2296d6da346ef70d4e48092a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- weaviate-ruby (0.7.1)
4
+ weaviate-ruby (0.7.3)
5
5
  faraday (~> 2.7)
6
6
  graphlient (~> 0.7.0)
7
7
 
data/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  Ruby wrapper for the Weaviate.io API
10
10
 
11
- ![Tests status](https://github.com/andreibondarev/weaviate-ruby/actions/workflows/ci.yml/badge.svg)
11
+ ![Tests status](https://github.com/andreibondarev/weaviate-ruby/actions/workflows/ci.yml/badge.svg) [![Gem Version](https://badge.fury.io/rb/weaviate-ruby.svg)](https://badge.fury.io/rb/weaviate-ruby)
12
12
 
13
13
  ## Installation
14
14
 
@@ -172,6 +172,7 @@ client.objects.batch_delete(
172
172
  near_text = '{ concepts: ["biology"] }'
173
173
  sort_obj = '{ path: ["category"], order: desc }'
174
174
  where_obj = '{ path: ["id"], operator: Equal, valueString: "..." }'
175
+ with_hybrid = '{ query: "Sweets", alpha: 0.5 }'
175
176
 
176
177
  client.query.get(
177
178
  class_name: 'Question',
@@ -187,13 +188,13 @@ client.query.get(
187
188
  near_text: near_text,
188
189
 
189
190
  # To use this parameter you must have created your schema by setting the `vectorizer:` property to 'multi2vec-clip' or 'img2vec-neural'
190
- # near_image: ...,
191
+ near_image: near_image,
191
192
 
192
- # hybrid: ...,
193
+ with_hybrid: with_hybrid,
193
194
 
194
- # bm25: ...,
195
+ bm25: bm25,
195
196
 
196
- # near_object: ...,
197
+ near_object: near_object,
197
198
 
198
199
  ask: '{ question: "your-question?" }'
199
200
  )
@@ -12,7 +12,10 @@ module Weaviate
12
12
  where: nil,
13
13
  near_text: nil,
14
14
  near_vector: nil,
15
+ near_image: nil,
15
16
  near_object: nil,
17
+ with_hybrid: nil,
18
+ bm25: nil,
16
19
  ask: nil
17
20
  )
18
21
  response = client.graphql.execute(
@@ -23,7 +26,10 @@ module Weaviate
23
26
  where: where,
24
27
  near_text: near_text,
25
28
  near_vector: near_vector,
29
+ near_image: near_image,
26
30
  near_object: near_object,
31
+ with_hybrid: with_hybrid,
32
+ bm25: bm25,
27
33
  ask: ask
28
34
  ),
29
35
  after: after,
@@ -41,6 +47,7 @@ module Weaviate
41
47
  object_limit: nil,
42
48
  near_text: nil,
43
49
  near_vector: nil,
50
+ near_image: nil,
44
51
  near_object: nil,
45
52
  group_by: nil
46
53
  )
@@ -50,6 +57,7 @@ module Weaviate
50
57
  fields: fields,
51
58
  near_text: near_text,
52
59
  near_vector: near_vector,
60
+ near_image: near_image,
53
61
  near_object: near_object
54
62
  ),
55
63
  group_by: group_by,
@@ -69,6 +77,7 @@ module Weaviate
69
77
  where: nil,
70
78
  near_text: nil,
71
79
  near_vector: nil,
80
+ near_image: nil,
72
81
  near_object: nil
73
82
  )
74
83
  response = client.graphql.execute(
@@ -76,6 +85,7 @@ module Weaviate
76
85
  fields: fields,
77
86
  near_text: near_text,
78
87
  near_vector: near_vector,
88
+ near_image: near_image,
79
89
  near_object: near_object
80
90
  ),
81
91
  after: after,
@@ -94,6 +104,7 @@ module Weaviate
94
104
  where: nil,
95
105
  near_text: nil,
96
106
  near_vector: nil,
107
+ near_image: nil,
97
108
  near_object: nil,
98
109
  sort: nil
99
110
  )
@@ -107,6 +118,7 @@ module Weaviate
107
118
  offset: $offset,
108
119
  #{near_text.present? ? "nearText: #{near_text}" : ""},
109
120
  #{near_vector.present? ? "nearVector: #{near_vector}" : ""},
121
+ #{near_image.present? ? "nearImage: #{near_image}" : ""},
110
122
  #{near_object.present? ? "nearObject: #{near_object}" : ""}
111
123
  #{where.present? ? "where: #{where}" : ""},
112
124
  #{sort.present? ? "sort: #{sort}" : ""}
@@ -123,7 +135,10 @@ module Weaviate
123
135
  where: nil,
124
136
  near_text: nil,
125
137
  near_vector: nil,
138
+ near_image: nil,
126
139
  near_object: nil,
140
+ with_hybrid: nil,
141
+ bm25: nil,
127
142
  ask: nil,
128
143
  sort: nil
129
144
  )
@@ -140,7 +155,10 @@ module Weaviate
140
155
  offset: $offset,
141
156
  #{near_text.present? ? "nearText: #{near_text}" : ""},
142
157
  #{near_vector.present? ? "nearVector: #{near_vector}" : ""},
158
+ #{near_image.present? ? "nearImage: #{near_image}" : ""},
143
159
  #{near_object.present? ? "nearObject: #{near_object}" : ""},
160
+ #{with_hybrid.present? ? "hybrid: #{with_hybrid}" : ""},
161
+ #{bm25.present? ? "bm25: #{bm25}" : ""},
144
162
  #{ask.present? ? "ask: #{ask}" : ""},
145
163
  #{where.present? ? "where: #{where}" : ""},
146
164
  #{sort.present? ? "sort: #{sort}" : ""}
@@ -157,6 +175,7 @@ module Weaviate
157
175
  fields:,
158
176
  near_text: nil,
159
177
  near_vector: nil,
178
+ near_image: nil,
160
179
  near_object: nil
161
180
  )
162
181
  client.graphql.parse <<~GRAPHQL
@@ -170,6 +189,7 @@ module Weaviate
170
189
  groupBy: $group_by,
171
190
  #{near_text.present? ? "nearText: #{near_text}" : ""},
172
191
  #{near_vector.present? ? "nearVector: #{near_vector}" : ""},
192
+ #{near_image.present? ? "nearImage: #{near_image}" : ""},
173
193
  #{near_object.present? ? "nearObject: #{near_object}" : ""}
174
194
  ) {
175
195
  #{fields}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Weaviate
4
- VERSION = "0.7.1"
4
+ VERSION = "0.7.3"
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.7.1
4
+ version: 0.7.3
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-04-09 00:00:00.000000000 Z
11
+ date: 2023-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday