qdrant-ruby 0.9.0 → 0.9.2

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: e374c7344a64474b0d88faefea6e3c47a2c588a53a2020ab69da589b5f5930a0
4
+ data.tar.gz: 9d687f910621dea7871a6b2a7d74b637dd148ee8ace845838b8a44ce3fd7b7d8
5
5
  SHA512:
6
- metadata.gz: 9bf396fa44eaa91e55f7ab32931d94abaef25b08cad04343ea84cfef598be83efa7f24bce089adacd72862d716ad64dc0292a2afc5e53a2b0b17c604411b5879
7
- data.tar.gz: ff78d356d410a6fbf1bc60e6373cd50c924bc0531650abe998b21ec0cb91656fc996911992ddba195aa1ef7cf913ca8e99c582b2d9a8a8f1d0e1809507e12d13
6
+ metadata.gz: aa4ca682cb0f99172e362dde78c1ce3694371fa46dcecdee423c7900e9bc20a63160307a1ffb51f0c9476c7ed6d29d20a185744c9a70a6994d73b9837db0843c
7
+ data.tar.gz: 8afde1d92ef46bf449de7cbf2d8733651b283fb3a735df067f64bfc84870a6de4b63b7b36e6015fe4a078378dc4770f4fa949eca51a6f3cf0e82f0f29b4012aa
data/Gemfile.lock CHANGED
@@ -1,8 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qdrant-ruby (0.9.0)
5
- faraday (~> 2.7)
4
+ qdrant-ruby (0.9.2)
5
+ faraday (~> 1)
6
+ faraday_middleware (~> 1)
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
@@ -11,13 +12,15 @@ GEM
11
12
  byebug (11.1.3)
12
13
  coderay (1.1.3)
13
14
  diff-lcs (1.5.0)
14
- faraday (2.7.4)
15
- faraday-net_http (>= 2.0, < 3.1)
16
- ruby2_keywords (>= 0.0.4)
17
- faraday-net_http (3.0.2)
15
+ faraday (1.2.0)
16
+ multipart-post (>= 1.2, < 3)
17
+ ruby2_keywords
18
+ faraday_middleware (1.2.0)
19
+ faraday (~> 1.0)
18
20
  json (2.6.3)
19
21
  language_server-protocol (3.17.0.3)
20
22
  method_source (1.0.0)
23
+ multipart-post (2.3.0)
21
24
  parallel (1.22.1)
22
25
  parser (3.2.1.1)
23
26
  ast (~> 2.4.1)
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",
@@ -37,7 +37,7 @@ client = Qdrant::Client.new(
37
37
 
38
38
  ```ruby
39
39
  # Get list name of all existing collections
40
- client.collections.list(collection_name: "string")
40
+ client.collections.list
41
41
 
42
42
  # Get detailed information about specified existing collection
43
43
  client.collections.get(collection_name: "string")
@@ -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
@@ -1,24 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "faraday"
4
+ require "faraday_middleware"
4
5
  require "forwardable"
5
6
 
6
7
  module Qdrant
7
8
  class Client
8
9
  extend Forwardable
9
10
 
10
- attr_reader :url, :api_key, :adapter
11
+ attr_reader :url, :api_key, :adapter, :raise_error
11
12
 
12
13
  def_delegators :service, :telemetry, :metrics, :locks, :set_lock
13
14
 
14
15
  def initialize(
15
16
  url:,
16
17
  api_key: nil,
17
- adapter: Faraday.default_adapter
18
+ adapter: Faraday.default_adapter,
19
+ raise_error: false
18
20
  )
19
21
  @url = url
20
22
  @api_key = api_key
21
23
  @adapter = adapter
24
+ @raise_error = raise_error
22
25
  end
23
26
 
24
27
  def connection
@@ -27,6 +30,7 @@ module Qdrant
27
30
  faraday.headers["api-key"] = api_key
28
31
  end
29
32
  faraday.request :json
33
+ faraday.response :raise_error if raise_error
30
34
  faraday.response :json, content_type: /\bjson$/
31
35
  faraday.adapter adapter
32
36
  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.2"
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.2
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-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.7'
19
+ version: '1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.7'
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'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: pry-byebug
29
43
  requirement: !ruby/object:Gem::Requirement