milvus 0.9.1 → 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: 5b98bd866a58ffe5ec2af3c3a6898dce1d21a7371304e9573eebac55ac92f58e
4
- data.tar.gz: 513225360680ac97c574830072b2d938b3143399678cc84cb73a15e73cb18a52
3
+ metadata.gz: 54f24d920b46117ddff329e4a6027cd80992342032cc75641c3b497ff441cfde
4
+ data.tar.gz: 952e9546f4f4bb6bcad88d37aa78a9557df2127dd508c47c3ffbdc50dd95119e
5
5
  SHA512:
6
- metadata.gz: baa9ab3b227bca3d2b3e8789718a84e4fefc30bfad4a8813a670f05ac9e63ad1c310ffdfc9fb3bea2fd7000c43c1b43ef9c48f9fae9924a0b2f7de3565d44f07
7
- data.tar.gz: b82816bbf2b640876f5306b594b3577db55dd0be348dce52d7e590b3d80c28aef24aeb1f62afcd0c398ebdec201adda01e05a0711b8489c100d9b407693981b0
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.1)
5
- faraday (~> 1)
4
+ milvus (0.9.2)
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)
@@ -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.1"
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.1
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-05-10 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: '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