qdrant-ruby 0.9.2 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.env.example +2 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +7 -9
- data/README.md +16 -2
- data/lib/qdrant/client.rb +0 -1
- data/lib/qdrant/points.rb +19 -0
- data/lib/qdrant/version.rb +1 -1
- metadata +12 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6131bbeba0933605e9a986616e976adf0d9a7fd7ced10b1e0d4e2794f918a5bd
|
4
|
+
data.tar.gz: 437883b5892665cf213398706549308aca932dccf3a19ed3ddfb204275a6b372
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06d903b87b1c4a9a14914d89258b7c111b33791130f377354393cd00e7406f88b136f9b0ac423130f4d7f86fef074be5ec252efe6870844c932b3336cdf6ba21
|
7
|
+
data.tar.gz: aceebbe09a885650e3fd112097f47f325ba380fecc181cc172bc1bbff29028ad9b9a687fde926d356f30a672d357d4755e40ee30a5361193c0cda26c048dd045
|
data/.env.example
ADDED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
qdrant-ruby (0.9.
|
5
|
-
faraday (
|
6
|
-
faraday_middleware (~> 1)
|
4
|
+
qdrant-ruby (0.9.4)
|
5
|
+
faraday (>= 2.0.1, < 3)
|
7
6
|
|
8
7
|
GEM
|
9
8
|
remote: https://rubygems.org/
|
@@ -12,15 +11,13 @@ GEM
|
|
12
11
|
byebug (11.1.3)
|
13
12
|
coderay (1.1.3)
|
14
13
|
diff-lcs (1.5.0)
|
15
|
-
faraday (
|
16
|
-
|
17
|
-
ruby2_keywords
|
18
|
-
|
19
|
-
faraday (~> 1.0)
|
14
|
+
faraday (2.7.10)
|
15
|
+
faraday-net_http (>= 2.0, < 3.1)
|
16
|
+
ruby2_keywords (>= 0.0.4)
|
17
|
+
faraday-net_http (3.0.2)
|
20
18
|
json (2.6.3)
|
21
19
|
language_server-protocol (3.17.0.3)
|
22
20
|
method_source (1.0.0)
|
23
|
-
multipart-post (2.3.0)
|
24
21
|
parallel (1.22.1)
|
25
22
|
parser (3.2.1.1)
|
26
23
|
ast (~> 2.4.1)
|
@@ -72,6 +69,7 @@ GEM
|
|
72
69
|
|
73
70
|
PLATFORMS
|
74
71
|
x86_64-darwin-19
|
72
|
+
x86_64-darwin-21
|
75
73
|
x86_64-linux
|
76
74
|
|
77
75
|
DEPENDENCIES
|
data/README.md
CHANGED
@@ -6,9 +6,15 @@
|
|
6
6
|
<img alt='Ruby logo' src='https://user-images.githubusercontent.com/541665/230231593-43861278-4550-421d-a543-fd3553aac4f6.png' height='40' />
|
7
7
|
</p>
|
8
8
|
|
9
|
-
Ruby wrapper for the Qdrant vector search database API
|
9
|
+
Ruby wrapper for the Qdrant vector search database API.
|
10
10
|
|
11
|
-
|
11
|
+
Part of the [Langchain.rb](https://github.com/andreibondarev/langchainrb) stack.
|
12
|
+
|
13
|
+
![Tests status](https://github.com/andreibondarev/qdrant-ruby/actions/workflows/ci.yml/badge.svg)
|
14
|
+
[![Gem Version](https://badge.fury.io/rb/qdrant-ruby.svg)](https://badge.fury.io/rb/qdrant-ruby)
|
15
|
+
[![Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/gems/qdrant-ruby)
|
16
|
+
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/andreibondarev/qdrant-ruby/blob/main/LICENSE.txt)
|
17
|
+
[![](https://dcbadge.vercel.app/api/server/WDARp7J2n8?compact=true&style=flat)](https://discord.gg/WDARp7J2n8)
|
12
18
|
|
13
19
|
## Installation
|
14
20
|
|
@@ -157,6 +163,14 @@ client.points.get(
|
|
157
163
|
consistency: "int"
|
158
164
|
)
|
159
165
|
|
166
|
+
# Retrieve full information of points by ids
|
167
|
+
client.points.get_all(
|
168
|
+
collection_name: "string", # required
|
169
|
+
ids: "[int]", # required
|
170
|
+
with_payload: "boolean"
|
171
|
+
with_vector: "boolean"
|
172
|
+
)
|
173
|
+
|
160
174
|
# Lists all data objects in reverse order of creation. The data will be returned as an array of objects.
|
161
175
|
client.points.list(
|
162
176
|
collection_name: "string", # required
|
data/lib/qdrant/client.rb
CHANGED
data/lib/qdrant/points.rb
CHANGED
@@ -71,6 +71,25 @@ module Qdrant
|
|
71
71
|
response.body
|
72
72
|
end
|
73
73
|
|
74
|
+
# Retrieve full information of points by ids
|
75
|
+
def get_all(
|
76
|
+
collection_name:,
|
77
|
+
ids:,
|
78
|
+
consistency: nil,
|
79
|
+
with_payload: nil,
|
80
|
+
with_vector: nil
|
81
|
+
)
|
82
|
+
response = client.connection.post("collections/#{collection_name}/#{PATH}") do |req|
|
83
|
+
req.params["consistency"] = consistency unless consistency.nil?
|
84
|
+
|
85
|
+
req.body = {}
|
86
|
+
req.body["ids"] = ids
|
87
|
+
req.body["with_payload"] = with_payload unless with_payload.nil?
|
88
|
+
req.body["with_vector"] = with_vector unless with_vector.nil?
|
89
|
+
end
|
90
|
+
response.body
|
91
|
+
end
|
92
|
+
|
74
93
|
# Set payload values for points
|
75
94
|
def set_payload(
|
76
95
|
collection_name:,
|
data/lib/qdrant/version.rb
CHANGED
metadata
CHANGED
@@ -1,43 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qdrant-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
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-
|
11
|
+
date: 2023-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
19
|
+
version: 2.0.1
|
20
|
+
- - "<"
|
25
21
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: faraday_middleware
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1'
|
22
|
+
version: '3'
|
34
23
|
type: :runtime
|
35
24
|
prerelease: false
|
36
25
|
version_requirements: !ruby/object:Gem::Requirement
|
37
26
|
requirements:
|
38
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 2.0.1
|
30
|
+
- - "<"
|
39
31
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
32
|
+
version: '3'
|
41
33
|
- !ruby/object:Gem::Dependency
|
42
34
|
name: pry-byebug
|
43
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,6 +52,7 @@ executables: []
|
|
60
52
|
extensions: []
|
61
53
|
extra_rdoc_files: []
|
62
54
|
files:
|
55
|
+
- ".env.example"
|
63
56
|
- ".rspec"
|
64
57
|
- CHANGELOG.md
|
65
58
|
- Gemfile
|