From eedf7f1d90fd91bdceb67976a84d09eb4b626f16 Mon Sep 17 00:00:00 2001 From: Ali Hamdi Ali Fadel Date: Mon, 18 Dec 2023 17:08:09 +0300 Subject: [PATCH] Handle deleting un-existing collection --- lib/chromable.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/chromable.rb b/lib/chromable.rb index 4cc2c61..f3a70f4 100644 --- a/lib/chromable.rb +++ b/lib/chromable.rb @@ -49,6 +49,8 @@ def chroma_collection def chroma_delete_collection Chroma::Resources::Collection.delete(chromable_settings.collection_name) + rescue Chroma::InvalidRequestError + Chroma::Util.log_debug("Collection #{chromable_settings.collection_name} does not exist.") end def chroma_query(text:, results: 10, where: {}, where_document: {}, **embedder_options)