qdrant-ruby 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/lib/qdrant/client.rb +5 -2
- data/lib/qdrant/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5faeaf863dc4846f2a594e68c7a03858cf0e41e677103c57088aeb699539e32
|
4
|
+
data.tar.gz: d86c32d7a033176eaad8661847daebf235f2cdffae482b491ef703b8a793bbbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efbf0ef50926d4096992d4901f2dbb0dd0b7e87681fc9c9cfd56e678dfe98cd0713a35001f3500f04a8c4b749e1679ea204849adb6d2a929ed77d199258d52ec
|
7
|
+
data.tar.gz: 1b52751835e08b9455299f12c35bbed9a18c1073d3ee2fe8cb3178ed554706204db03b99f9e404a64a3dc69d354cbaedb24ce25a3c5969c3b67fda8ae5a51bb1
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
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)
|
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)
|
12
12
|
|
13
13
|
## Installation
|
14
14
|
|
@@ -25,7 +25,7 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
25
25
|
### Instantiating API client
|
26
26
|
|
27
27
|
```ruby
|
28
|
-
require 'qdrant
|
28
|
+
require 'qdrant'
|
29
29
|
|
30
30
|
client = Qdrant::Client.new(
|
31
31
|
url: "your-qdrant-url",
|
@@ -59,13 +59,13 @@ client.collections.create(
|
|
59
59
|
|
60
60
|
# Update parameters of the existing collection
|
61
61
|
client.collections.update(
|
62
|
-
collection_name:
|
62
|
+
collection_name: "string", # required
|
63
63
|
optimizers_config: nil,
|
64
64
|
params: nil
|
65
65
|
)
|
66
66
|
|
67
67
|
# Drop collection and all associated data
|
68
|
-
client.collections.delete(collection_name:
|
68
|
+
client.collections.delete(collection_name: "string")
|
69
69
|
|
70
70
|
# Get list of all aliases (for a collection)
|
71
71
|
client.collections.aliases(
|
data/lib/qdrant/client.rb
CHANGED
@@ -7,18 +7,20 @@ module Qdrant
|
|
7
7
|
class Client
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
-
attr_reader :url, :api_key, :adapter
|
10
|
+
attr_reader :url, :api_key, :adapter, :raise_error
|
11
11
|
|
12
12
|
def_delegators :service, :telemetry, :metrics, :locks, :set_lock
|
13
13
|
|
14
14
|
def initialize(
|
15
15
|
url:,
|
16
16
|
api_key: nil,
|
17
|
-
adapter: Faraday.default_adapter
|
17
|
+
adapter: Faraday.default_adapter,
|
18
|
+
raise_error: false
|
18
19
|
)
|
19
20
|
@url = url
|
20
21
|
@api_key = api_key
|
21
22
|
@adapter = adapter
|
23
|
+
@raise_error = raise_error
|
22
24
|
end
|
23
25
|
|
24
26
|
def connection
|
@@ -27,6 +29,7 @@ module Qdrant
|
|
27
29
|
faraday.headers["api-key"] = api_key
|
28
30
|
end
|
29
31
|
faraday.request :json
|
32
|
+
faraday.response :raise_error if raise_error
|
30
33
|
faraday.response :json, content_type: /\bjson$/
|
31
34
|
faraday.adapter adapter
|
32
35
|
end
|
data/lib/qdrant/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.1
|
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-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|