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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd79e1fac58cbc38dfb04e780f1a4b82ceca0ec8b601090c4414fc519afb6388
4
- data.tar.gz: 32c2e01c18699a532ca332fb69fb87881e4f627f69ad3091a5246f07bb54c268
3
+ metadata.gz: c5faeaf863dc4846f2a594e68c7a03858cf0e41e677103c57088aeb699539e32
4
+ data.tar.gz: d86c32d7a033176eaad8661847daebf235f2cdffae482b491ef703b8a793bbbc
5
5
  SHA512:
6
- metadata.gz: 9bf396fa44eaa91e55f7ab32931d94abaef25b08cad04343ea84cfef598be83efa7f24bce089adacd72862d716ad64dc0292a2afc5e53a2b0b17c604411b5879
7
- data.tar.gz: ff78d356d410a6fbf1bc60e6373cd50c924bc0531650abe998b21ec0cb91656fc996911992ddba195aa1ef7cf913ca8e99c582b2d9a8a8f1d0e1809507e12d13
6
+ metadata.gz: efbf0ef50926d4096992d4901f2dbb0dd0b7e87681fc9c9cfd56e678dfe98cd0713a35001f3500f04a8c4b749e1679ea204849adb6d2a929ed77d199258d52ec
7
+ data.tar.gz: 1b52751835e08b9455299f12c35bbed9a18c1073d3ee2fe8cb3178ed554706204db03b99f9e404a64a3dc69d354cbaedb24ce25a3c5969c3b67fda8ae5a51bb1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qdrant-ruby (0.9.0)
4
+ qdrant-ruby (0.9.1)
5
5
  faraday (~> 2.7)
6
6
 
7
7
  GEM
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-ruby'
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: '', # required
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Qdrant
4
- VERSION = "0.9.0"
4
+ VERSION = "0.9.1"
5
5
  end
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.0
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-04-08 00:00:00.000000000 Z
11
+ date: 2023-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday