qdrant-ruby 0.9.2 → 0.9.4

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: e374c7344a64474b0d88faefea6e3c47a2c588a53a2020ab69da589b5f5930a0
4
- data.tar.gz: 9d687f910621dea7871a6b2a7d74b637dd148ee8ace845838b8a44ce3fd7b7d8
3
+ metadata.gz: 6131bbeba0933605e9a986616e976adf0d9a7fd7ced10b1e0d4e2794f918a5bd
4
+ data.tar.gz: 437883b5892665cf213398706549308aca932dccf3a19ed3ddfb204275a6b372
5
5
  SHA512:
6
- metadata.gz: aa4ca682cb0f99172e362dde78c1ce3694371fa46dcecdee423c7900e9bc20a63160307a1ffb51f0c9476c7ed6d29d20a185744c9a70a6994d73b9837db0843c
7
- data.tar.gz: 8afde1d92ef46bf449de7cbf2d8733651b283fb3a735df067f64bfc84870a6de4b63b7b36e6015fe4a078378dc4770f4fa949eca51a6f3cf0e82f0f29b4012aa
6
+ metadata.gz: 06d903b87b1c4a9a14914d89258b7c111b33791130f377354393cd00e7406f88b136f9b0ac423130f4d7f86fef074be5ec252efe6870844c932b3336cdf6ba21
7
+ data.tar.gz: aceebbe09a885650e3fd112097f47f325ba380fecc181cc172bc1bbff29028ad9b9a687fde926d356f30a672d357d4755e40ee30a5361193c0cda26c048dd045
data/.env.example ADDED
@@ -0,0 +1,2 @@
1
+ QDRANT_URL=
2
+ QDRANT_API_KEY=
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.9.4] - 2023-08-31
4
+ - Introduce `Points#get_all()` method
5
+
3
6
  ## [0.9.0] - 2023-04-08
4
7
 
5
8
  - Initial release
data/Gemfile.lock CHANGED
@@ -1,9 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qdrant-ruby (0.9.2)
5
- faraday (~> 1)
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 (1.2.0)
16
- multipart-post (>= 1.2, < 3)
17
- ruby2_keywords
18
- faraday_middleware (1.2.0)
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
- ![Tests status](https://github.com/andreibondarev/qdrant-ruby/actions/workflows/ci.yml/badge.svg) [![Gem Version](https://badge.fury.io/rb/qdrant-ruby.svg)](https://badge.fury.io/rb/qdrant-ruby)
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
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "faraday"
4
- require "faraday_middleware"
5
4
  require "forwardable"
6
5
 
7
6
  module Qdrant
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:,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Qdrant
4
- VERSION = "0.9.2"
4
+ VERSION = "0.9.4"
5
5
  end
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.2
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-05-10 00:00:00.000000000 Z
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: '1'
20
- type: :runtime
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: '1'
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: '1'
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