-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/Complete functionality to delete documents #7
base: main
Are you sure you want to change the base?
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 ↗︎
|
app/api/chat/route.ts
Outdated
@@ -170,6 +170,8 @@ export async function POST(req: NextRequest) { | |||
), | |||
).toString('base64'); | |||
|
|||
// add a chat thing to prisma |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. Removed in the new commit
|
||
interface DeleteFileParams { | ||
accountId: string; | ||
apiKey: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be a parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
app/dashboard/dashboard-client.tsx
Outdated
console.log(data.error); | ||
} else { | ||
console.log('Document deleted successfully'); | ||
updateDocsList(docsList.filter((doc) => doc.id !== id)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably unnecessary to wrap this? Just call setDocsList
directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. 😄