chromable 0.3.1 → 0.3.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: ad740d4c1d70642aa0e03518c74cb5e2b77a68df923a9e46e0797eb42908c312
4
- data.tar.gz: 4cdb45e1599c5f579082cac30ff9c3887adaee9921d2bf73f20b6f96401769cd
3
+ metadata.gz: 30a53a0c8bde8c1d4c091e073058d6273d57cfd191cfeff0f4f48817e2bf14d4
4
+ data.tar.gz: 4374788d45a3acb8e491c452f862bb20bf5634dcfb483cf194d9c7090b349de7
5
5
  SHA512:
6
- metadata.gz: 19ee5d2e13a7b61962442766faa52f52930acc221b346ac91609eab01c1c9cb6aad01bfd96c444451925434c39ede78d7b949923a0824ef7ae89276b11c49869
7
- data.tar.gz: 8de31a2f2b16402acef0d391e39a1049622dcbc3a69968ce0e8485492e1acbb7dae77ab88ae782bc1ef07ae42a43102929e5a47791a8c5443dd67f758e054c4b
6
+ metadata.gz: 2488713488c214ab53be05616da9ca3a7ee7e3c619c4627d3b338a1454680add7284b2fef6e84007285acc0f3830d24290f09024b5189241e3657bb9086cce17
7
+ data.tar.gz: bf63bb358eb179ae5ab7e02fcdeb88d1657d2d3009e28b3e3c5d7354a8bb0a7e387a09020920d8bc88cb03ad10fb18ac4d5f3ac8926a979094a0fa575340af2e
data/README.md CHANGED
@@ -73,7 +73,7 @@ Post.query(
73
73
  is_query: true # `is_query` here will be passed to `Post.embed` as an option.
74
74
  )
75
75
 
76
- Post.first.neighbors(results: 20) # => [#<Post:0x0000ffff9e0b5f10 id: "0beb0f98, ...>, ...]
76
+ Post.first.neighbors(results: 20) # => [#<Post:0x0000ffff9e0b5f10 id: "0beb0f98...", ...>, ...]
77
77
  ```
78
78
 
79
79
  Also, `chromable` provides the following methods for each model instance:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Chromable
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.3'
5
5
  end
data/lib/chromable.rb CHANGED
@@ -56,8 +56,7 @@ module Chromable
56
56
  query_embeddings: [send(chromable_settings.embedder, text, **embedder_options)],
57
57
  results: results,
58
58
  where: where,
59
- where_document: where_document,
60
- include: include
59
+ where_document: where_document
61
60
  ).map(&:id))
62
61
  end
63
62
  end
@@ -96,8 +95,7 @@ module Chromable
96
95
  query_embeddings: [embedding],
97
96
  results: results,
98
97
  where: where,
99
- where_document: where_document,
100
- include: include
98
+ where_document: where_document
101
99
  ).map(&:id))
102
100
  end
103
101
 
@@ -105,7 +103,7 @@ module Chromable
105
103
 
106
104
  def build_embedding
107
105
  Chroma::Resources::Embedding.new(
108
- id: id,
106
+ id: id.to_s,
109
107
  document: document_to_embed,
110
108
  embedding: document_embedding,
111
109
  metadata: embedding_metadata
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chromable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Hamdi Ali Fadel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-13 00:00:00.000000000 Z
11
+ date: 2023-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chroma-db