langchainrb
langchainrb copied to clipboard
Fix for updating record on pinecone
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 Specs are broken.
Closing due to inactivity.