Feature/Complete functionality to delete documents#7
Conversation
|
@psbhatbvbcs is attempting to deploy a commit to the Hassanteam Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| ), | ||
| ).toString('base64'); | ||
|
|
||
| // add a chat thing to prisma |
There was a problem hiding this comment.
Yup. Removed in the new commit
|
|
||
| interface DeleteFileParams { | ||
| accountId: string; | ||
| apiKey: string; |
There was a problem hiding this comment.
Does this need to be a parameter?
There was a problem hiding this comment.
I followed the docs of bytescale to implement functionality so I just added this to resolve typescript errors. The Api key is taken from the env variables and then passed to this. Can be removed but i though of keeping the same syntax as docs.
| console.log(data.error); | ||
| } else { | ||
| console.log('Document deleted successfully'); | ||
| updateDocsList(docsList.filter((doc) => doc.id !== id)); |
There was a problem hiding this comment.
Probably unnecessary to wrap this? Just call setDocsList directly?
There was a problem hiding this comment.
Yeah right. I have done all the requested changes
|
I think logic looks good! @Nutlope would be better to weigh in on the frontend UX and design. |
|
@jacoblee93 I have done all the requested changes! Thanks for bringing them into light |
|
Hello, @jacoblee93 To complete the deletion of a document, shouldn't the vectors created in pinecone also be deleted? |
|
You are correct, thanks for catching! |
|
Hey @Eric013 !! I though of that too initially, but I had assumed it just created new vectors from 0 when i added new documents. But after checking you were right. Added that functionality too to delete that specific document vectors with its namespace. |
Fixes #4 : Unable to delete documents
Hey @jacoblee93 and @Nutlope ! Amazing project.
Summary:
NOTE:
NEXT_SECRET_BYTESCALE_API_KEY=
This key can be found in: Bytescale Dashboard > Security > API keys > Secret.
I plan to make regular contributions on the project if I am welcome!
Thank you! And hope you find my feature helpful. 😄