langchainrb icon indicating copy to clipboard operation
langchainrb copied to clipboard

Fix for updating record on pinecone

Open ddyy opened this issue 1 year ago • 1 comments

When updating a record with pinecone db, I receive this error:

NoMethodError: undefined method `empty?' for nil:NilClass (NoMethodError)

  inputs["setMetadata"] = set_metadata unless set_metadata.empty?
                                                          ^^^^^^^

/ruby-3.2.2/gems/pinecone-0.1.71/lib/pinecone/vector.rb:51:in update' /ruby-3.2.2/gems/langchainrb-0.8.2/lib/langchain/vectorsearch/pinecone.rb:91:in block in update_texts'

This PR fixes the missing metadata by setting it the same way in update_data as it's set in add_data

ddyy avatar Feb 23 '24 01:02 ddyy

@ddyy Specs are broken.

andreibondarev avatar Feb 25 '24 15:02 andreibondarev

Closing due to inactivity.

andreibondarev avatar Oct 23 '24 20:10 andreibondarev