Skip to content

Commit

Permalink
Handle deleting un-existing collection
Browse files Browse the repository at this point in the history
  • Loading branch information
AliOsm committed Dec 18, 2023
1 parent dcd17df commit eedf7f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/chromable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit eedf7f1

Please # to comment.