milvus 0.9.1 → 0.9.3

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: 5b98bd866a58ffe5ec2af3c3a6898dce1d21a7371304e9573eebac55ac92f58e
4
- data.tar.gz: 513225360680ac97c574830072b2d938b3143399678cc84cb73a15e73cb18a52
3
+ metadata.gz: f0b1a3fa88ea1e79f7a139441dc0665e4631ecf160a9d1507a556ef2e3aedb74
4
+ data.tar.gz: 1a215e718b86ffb2eab1b103d60d02b60ef493f90c88bcb28e05f0f1f6d07fa4
5
5
  SHA512:
6
- metadata.gz: baa9ab3b227bca3d2b3e8789718a84e4fefc30bfad4a8813a670f05ac9e63ad1c310ffdfc9fb3bea2fd7000c43c1b43ef9c48f9fae9924a0b2f7de3565d44f07
7
- data.tar.gz: b82816bbf2b640876f5306b594b3577db55dd0be348dce52d7e590b3d80c28aef24aeb1f62afcd0c398ebdec201adda01e05a0711b8489c100d9b407693981b0
6
+ metadata.gz: d41d1ddf7d468d69b857bf07fc70926dca0193656768359250e038340211c4798e44390b337edcbee632a8b9e5a104fd082a2b506e0fa90a46c48627a55d4ef6
7
+ data.tar.gz: fbbc287d804be3babdd0ff9f3a08bd0ebacfcfa3e7d2338397d431784e4b2b5143889d5fc067a82ab33d06a93525bbd9a2f772a949238dbbcbe8bddff75cb19d
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 3.3.0
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- milvus (0.9.1)
5
- faraday (~> 1)
4
+ milvus (0.9.3)
5
+ faraday (>= 2.0.1, < 3)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -11,13 +11,13 @@ GEM
11
11
  byebug (11.1.3)
12
12
  coderay (1.1.3)
13
13
  diff-lcs (1.5.0)
14
- faraday (1.2.0)
15
- multipart-post (>= 1.2, < 3)
16
- ruby2_keywords
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)
17
18
  json (2.6.3)
18
19
  language_server-protocol (3.17.0.3)
19
20
  method_source (1.0.0)
20
- multipart-post (2.3.0)
21
21
  parallel (1.23.0)
22
22
  parser (3.2.2.0)
23
23
  ast (~> 2.4.1)
@@ -68,7 +68,9 @@ GEM
68
68
  unicode-display_width (2.4.2)
69
69
 
70
70
  PLATFORMS
71
+ arm64-darwin-23
71
72
  x86_64-darwin-19
73
+ x86_64-darwin-21
72
74
  x86_64-darwin-22
73
75
  x86_64-linux
74
76
 
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
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Milvus
4
+ # https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/DataType.md
4
5
  DATA_TYPES = {
5
6
  "boolean" => 1,
6
7
  "int8" => 2,
@@ -11,7 +12,12 @@ module Milvus
11
12
  "double" => 11,
12
13
  "string" => 20,
13
14
  "varchar" => 21,
14
- "binary_vector" => 101,
15
- "float_vector" => 102
15
+ "array" => 22,
16
+ "json" => 23,
17
+ "binary_vector" => 100,
18
+ "float_vector" => 101,
19
+ "float16_vector" => 102,
20
+ "bfloat16_vector" => 103,
21
+ "sparse_float_vector" => 104
16
22
  }.freeze
17
23
  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.1"
4
+ VERSION = "0.9.3"
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.1
4
+ version: 0.9.3
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: 2024-07-01 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: '1'
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: '1'
46
+ version: '3'
41
47
  description: Ruby wrapper for the Milvus vector search database API
42
48
  email:
43
49
  - andrei.bondarev13@gmail.com
@@ -46,6 +52,7 @@ extensions: []
46
52
  extra_rdoc_files: []
47
53
  files:
48
54
  - ".rspec"
55
+ - ".tool-versions"
49
56
  - CHANGELOG.md
50
57
  - Gemfile
51
58
  - Gemfile.lock
@@ -88,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
95
  - !ruby/object:Gem::Version
89
96
  version: '0'
90
97
  requirements: []
91
- rubygems_version: 3.3.7
98
+ rubygems_version: 3.5.14
92
99
  signing_key:
93
100
  specification_version: 4
94
101
  summary: Ruby wrapper for the Milvus vector search database API