milvus 0.9.0 → 0.9.2

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: 4910e3b8c5f02ed0a56dca251ec40f7f8033c3033e45d406faa90b4b56358029
4
- data.tar.gz: 61460b9e1bc168e4dfec03bddc1f010d1df465ab5b0648eac38843ba666dcb76
3
+ metadata.gz: 54f24d920b46117ddff329e4a6027cd80992342032cc75641c3b497ff441cfde
4
+ data.tar.gz: 952e9546f4f4bb6bcad88d37aa78a9557df2127dd508c47c3ffbdc50dd95119e
5
5
  SHA512:
6
- metadata.gz: 12670da71fd1c578a8e040259218ac93c33fc15c8d5e27bd15fb39bbc168a397dd55a13dcce5387d76aac942131da65d22ff3cbc7a9147d2b5e761e9aef87861
7
- data.tar.gz: 7e0614244bffe334bba059e59e981de0456f541a103f58df356754d5ff56546954d8c2d19d458b8cbb5ffd15817102bc6491f013823ed5498a94e6ce26c4d3a6
6
+ metadata.gz: e0fc2045dcb44866a1799d679d76fc4e40554bda2d4b25e408ba3262e76de01633d99c2d5da4b9cbde2fd45950c778ed132e9aaadc3a28765f10a8748527dc43
7
+ data.tar.gz: a78477e5479c246bc164f77e988b134d42af55c8879fd0b3d162af3042d2650adbfc7ecaf4da488a0749362f9c423a45aa31d19e612ebcb977dd10afbb99a74e
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- milvus (0.9.0)
5
- faraday (~> 2.7.0)
4
+ milvus (0.9.2)
5
+ faraday (>= 2.0.1, < 3)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -11,7 +11,7 @@ GEM
11
11
  byebug (11.1.3)
12
12
  coderay (1.1.3)
13
13
  diff-lcs (1.5.0)
14
- faraday (2.7.4)
14
+ faraday (2.7.10)
15
15
  faraday-net_http (>= 2.0, < 3.1)
16
16
  ruby2_keywords (>= 0.0.4)
17
17
  faraday-net_http (3.0.2)
@@ -69,6 +69,7 @@ GEM
69
69
 
70
70
  PLATFORMS
71
71
  x86_64-darwin-19
72
+ x86_64-darwin-21
72
73
  x86_64-darwin-22
73
74
  x86_64-linux
74
75
 
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 Milvus vector search database API
9
+ Ruby wrapper for the Milvus vector search database API.
10
10
 
11
- ![Tests status](https://github.com/andreibondarev/milvus/actions/workflows/ci.yml/badge.svg) [![Gem Version](https://badge.fury.io/rb/milvus.svg)](https://badge.fury.io/rb/milvus)
11
+ Part of the [Langchain.rb](https://github.com/andreibondarev/langchainrb) stack.
12
+
13
+ ![Tests status](https://github.com/andreibondarev/milvus/actions/workflows/ci.yml/badge.svg)
14
+ [![Gem Version](https://badge.fury.io/rb/milvus.svg)](https://badge.fury.io/rb/milvus)
15
+ [![Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/gems/milvus)
16
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/andreibondarev/milvus/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
 
@@ -148,8 +154,8 @@ client.indices.create(
148
154
  ```
149
155
  ```ruby
150
156
  collection.indices.create(
151
- field_name="book_name",
152
- index_name="scalar_index",
157
+ field_name: "book_name",
158
+ index_name: "scalar_index",
153
159
  )
154
160
  ```
155
161
  ```ruby
@@ -11,7 +11,7 @@ module Milvus
11
11
  "double" => 11,
12
12
  "string" => 20,
13
13
  "varchar" => 21,
14
- "binary_vector" => 101,
15
- "float_vector" => 102
14
+ "binary_vector" => 100,
15
+ "float_vector" => 101
16
16
  }.freeze
17
17
  end
data/lib/milvus/search.rb CHANGED
@@ -6,8 +6,15 @@ module Milvus
6
6
 
7
7
  def post(
8
8
  collection_name:,
9
- anns_field:, top_k:, params:, metric_type:, vectors:, dsl_type:, output_fields: nil,
10
- round_decimal: nil
9
+ anns_field:,
10
+ top_k:,
11
+ params:,
12
+ metric_type:,
13
+ vectors:,
14
+ dsl_type:,
15
+ output_fields: nil,
16
+ round_decimal: nil,
17
+ vector_type: nil
11
18
  )
12
19
  response = client.connection.post(PATH) do |req|
13
20
  req.body = {
@@ -19,7 +26,8 @@ module Milvus
19
26
  {key: "metric_type", value: metric_type}
20
27
  ],
21
28
  dsl_type: dsl_type,
22
- vectors: vectors
29
+ vectors: vectors,
30
+ vector_type: vector_type
23
31
  }
24
32
  if round_decimal
25
33
  req.body[:search_params].push(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Milvus
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: milvus
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-21 00:00:00.000000000 Z
11
+ date: 2023-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry-byebug
@@ -28,16 +28,22 @@ dependencies:
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 2.0.1
34
+ - - "<"
32
35
  - !ruby/object:Gem::Version
33
- version: 2.7.0
36
+ version: '3'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 2.0.1
44
+ - - "<"
39
45
  - !ruby/object:Gem::Version
40
- version: 2.7.0
46
+ version: '3'
41
47
  description: Ruby wrapper for the Milvus vector search database API
42
48
  email:
43
49
  - andrei.bondarev13@gmail.com