chroma-db 0.8.1 → 0.8.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: 5a4fc64ab9c97c9630f0f438467d4a126c7665a33992ad0f357ca9ddfaab7eeb
4
- data.tar.gz: d5b48661b75917eaf8923dd7d2125230f9701144d3cffb18a5addeb8e90419e6
3
+ metadata.gz: 8f7a0ef254b27e7e3d06c9720893c4b416f971948aeda404da63d18325309c6f
4
+ data.tar.gz: 356777eec892cd99f11635cadcd4e510e5041cc40b8b04c2a8e4ecaa1179da65
5
5
  SHA512:
6
- metadata.gz: 986a2f8366a22ebca4b8f7aa831aa4bd04ef373768f62d7811b7f0f45d45dcc58d6fbe2758dc1af85ea2a8111d3aeee8185930b4639af412fb912d8067f5c970
7
- data.tar.gz: ddbf174e31dd7999a6dd0462f9fe03b3e0a439a71bb0cb7487d1d09f558ebd6a67aa6f543e28babd432d5f9fb24804c52ad322a8f53e5737a396ba9c09222274
6
+ metadata.gz: cbb667f3547c3a08f0a3859d3dc3fe4802bbbca46722af363cfcfad556c163c83e3606b48254fd43c8b1186ace9c63e764e32568e7e7eef4987b8e89632847f0
7
+ data.tar.gz: 1822f4ff02a4dafffbb32078ed186da5d9ccb0228725bb8fbf5b61f8d1f89fd78c0297605e49a9e050e2086ce81ac67771b0a273db25ed59970b5930729a2baa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## 0.8.2 2024-10-16
4
+
5
+ - Fixes API change in Collection#query method. Parameters `where` and `where_document` are now optional.
6
+
3
7
  ## 0.8.1 2024-10-16
4
8
 
5
9
  - Adds support for Chroma hosted service. See README for more details how to set your `api_key`, `tenant`, and `database`.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- chroma-db (0.8.1)
4
+ chroma-db (0.8.2)
5
5
  dry-monads (~> 1.6)
6
6
  ruby-next (~> 1.0, >= 1.0.3)
7
7
  zeitwerk (~> 2.6.0)
@@ -34,7 +34,7 @@ module Chroma
34
34
  # embeddings = collection.query(query_embeddings: [[1.5, 2.9, 3.3]], results: 5)
35
35
  #
36
36
  # Return an Array of Embedding with query results.
37
- def query(query_embeddings:, results: 10, where: {}, where_document: {}, include: %w[metadatas documents distances])
37
+ def query(query_embeddings:, results: 10, where: nil, where_document: nil, include: %w[metadatas documents distances])
38
38
  payload = {
39
39
  query_embeddings:,
40
40
  n_results: results,
@@ -43,6 +43,8 @@ module Chroma
43
43
  include:
44
44
  }
45
45
 
46
+ payload.delete_if { |_key, value| value.nil? }
47
+
46
48
  result = self.class.execute_request(:post, "#{Chroma.api_url}/collections/#{id}/query", payload)
47
49
 
48
50
  if result.success?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Chroma
4
- VERSION = "0.8.1"
4
+ VERSION = "0.8.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chroma-db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Alberto Chávez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-16 00:00:00.000000000 Z
11
+ date: 2024-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-monads
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0'
130
130
  requirements: []
131
- rubygems_version: 3.5.21
131
+ rubygems_version: 3.5.23
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: Ruby client for Chroma DB.