diff --git a/Gemfile.lock b/Gemfile.lock index 3d423d0..fd80eb6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - chromable (0.3.3) + chromable (0.3.4) chroma-db (>= 0.6.0) GEM diff --git a/lib/chromable.rb b/lib/chromable.rb index f3a70f4..e217274 100644 --- a/lib/chromable.rb +++ b/lib/chromable.rb @@ -77,7 +77,7 @@ def self.included(base) end def chroma_embedding - self.class.chroma_collection.get(ids: [id])[0] + self.class.chroma_collection.get(ids: [id.to_s])[0] end def chroma_upsert_embedding @@ -85,13 +85,13 @@ def chroma_upsert_embedding end def chroma_destroy_embedding - self.class.chroma_collection.delete(ids: [id]) + self.class.chroma_collection.delete(ids: [id.to_s]) end def chroma_neighbors(results: 10, where: {}, where_document: {}) collection = self.class.chroma_collection - embedding = collection.get(ids: [id], include: [:embeddings])[0].embedding + embedding = collection.get(ids: [id.to_s], include: [:embeddings])[0].embedding self.class.find(collection.query( query_embeddings: [embedding], diff --git a/lib/chromable/version.rb b/lib/chromable/version.rb index 837d7b5..247061a 100644 --- a/lib/chromable/version.rb +++ b/lib/chromable/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Chromable - VERSION = '0.3.3' + VERSION = '0.3.4' end