torvalds-dev / llama_index

LlamaIndex (formerly GPT Index) is a data framework for your LLM applications
https://docs.llamaindex.ai
MIT License
0 stars 0 forks source link

[Feature Request]: Add error statement when pinecone index deletion fails #6

Open 0xDTE opened 1 year ago

0xDTE commented 1 year ago

Feature Description

Add error statement when pinecone index deletion fails

Reason

No response

Value of Feature

No response

torvalds-dev commented 1 year ago

torvalds.dev is analyzing the ticket

torvalds-dev commented 1 year ago

The issue "[Feature Request]: Add error statement when pinecone index deletion fails" suggests that there is a need for an error statement when the deletion of a Pinecone index fails. This is likely to provide better feedback and error handling for the user.

The relevant files and classes for this issue are:

  1. llama_index/readers/pinecone.py: This file contains the PineconeReader class which is used to read data from Pinecone. However, it does not seem to handle index deletion.

  2. llama_index/vector_stores/pinecone.py: This file contains the PineconeVectorStore class which interacts with the Pinecone index. The delete method in this class is responsible for deleting nodes from the Pinecone index. This is likely where the error handling needs to be improved.

To address this issue, the following actions could be taken:

  1. In the delete method of the PineconeVectorStore class, add error handling to catch any exceptions that occur during the deletion process. This could be done using a try-except block.

  2. In the except block, log the error message and any relevant information about the failed deletion. This could be done using the _logger object that is already defined in the PineconeVectorStore class.

  3. If necessary, re-raise the exception after logging the error message. This would allow the error to be handled further up the call stack if needed.

  4. Test the updated delete method to ensure that it correctly logs errors when a deletion fails. This could be done by attempting to delete a non-existent node from the Pinecone index and checking that the appropriate error message is logged.