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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/chroma/resources/collection.rb +3 -1
- data/lib/chroma/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f7a0ef254b27e7e3d06c9720893c4b416f971948aeda404da63d18325309c6f
|
4
|
+
data.tar.gz: 356777eec892cd99f11635cadcd4e510e5041cc40b8b04c2a8e4ecaa1179da65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
@@ -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:
|
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?
|
data/lib/chroma/version.rb
CHANGED
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.
|
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-
|
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.
|
131
|
+
rubygems_version: 3.5.23
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Ruby client for Chroma DB.
|