Skip to content
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

[Brain as API] 10. AAU, i can delete / unsubscribe from api_based brain #1573

Closed
5 tasks
mamadoudicko opened this issue Nov 2, 2023 · 4 comments
Closed
5 tasks
Assignees
Labels
area: backend Related to backend functionality or under the /backend directory user story Subdivision of an epic

Comments

@mamadoudicko
Copy link
Contributor

mamadoudicko commented Nov 2, 2023

Link to the Epic

#1380

Explain the Functionality

  • User should be able to delete their api brains

Tech To-dos

  • On DELETE /brains/${brainId}/subscription, if user is owner, delete all subscriptions and brain else remove only user subscriptions
  • When removing subscriptions, remove secrets from vault storage (by using the delete function from Secret repository)

Tests

Validation Checks

  • Create an APIs brain with secrets
  • Delete it and check on supabase that its related data have been removed
  • Create a public APIs brain tickets with secret
  • Subscribe with a new account
  • Unsubscribe and check on Supabase that your secret have been removed
@mamadoudicko mamadoudicko added the user story Subdivision of an epic label Nov 2, 2023
Copy link

dosubot bot commented Nov 2, 2023

🤖

Hello @mamadoudicko,

It's great to see you again! I hope you've been well. Let's dive into your issue.

Give me a moment to look at your issue. I'll post a detailed answer shortly.

@dosubot dosubot bot added the area: backend Related to backend functionality or under the /backend directory label Nov 2, 2023
@mamadoudicko mamadoudicko changed the title 10. AAU, i can delete my ap_based brain 10. AAU, i can delete / unsubscribe from api_based brain Nov 2, 2023
Copy link

dosubot bot commented Nov 2, 2023

🤖

Based on the information available in the Quivr repository, it appears that there is functionality for a user to delete their "brain". However, the term "ap_based brain" is not specifically mentioned in the repository.

The process for deleting a brain involves interacting with the "Brain" class in the Quivr system. This class has a method called delete_brain which is used to delete a brain and all its associated data.

Here is a brief overview of the process:

  1. The user initiates the delete action, likely through a user interface element such as a button.
  2. The delete_brain method is called, which deletes the brain and all its associated data from the database.

It's important to note that this action is irreversible, as indicated by the confirmation prompt in the delete functionality.

For more details, you can refer to the Brain class in the backend/models/brains.py file.

As for the term "ap_based brain", it is not mentioned in the provided context. If you meant something else, please provide more context or clarify your question.

Regarding the technical requirements or dependencies needed to delete a brain, the exact details are not specified in the repository. However, it's likely that you would need to have the necessary permissions to delete a brain, and the brain must exist in the database.

If you need more specific information or if there are other aspects of the issue that you would like me to look into, please let me know.

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

Copy link

dosubot bot commented Nov 2, 2023

🤖

Based on the information available in the Quivr repository, it is possible for a user to delete their brain in Quivr. This functionality is indicated in the localization files for the delete functionality in Quivr. For example, the key "deleteButton" with the value "Supprimer le cerveau" indicates the presence of a delete function. The key "deleteConfirmQuestion" with the value "Êtes-vous sûr de vouloir supprimer le cerveau? Cette action est irréversible!" is a confirmation prompt to ensure the user wants to delete the brain, indicating that this action is irreversible. The key "successfully_deleted" with the value "Cerveau supprimé avec succès." confirms that the brain has been successfully deleted.

However, the term "ap_based brain" is not mentioned in the provided context or in the Quivr repository. If you meant something else, please provide more context or clarify your question.

As for the dependencies or linked functionalities that might be affected when a user deletes their brain, I wasn't able to find specific information within the repository. It would be helpful if you could provide more details or context about this.

For reference, here are the sources I used to gather this information:

I hope this information is helpful. If you have any other questions or need further clarification, please let me know.

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

Copy link

dosubot bot commented Nov 2, 2023

🤖

Based on the information provided, it appears that you want to delete your ap_based brain in Quivr. Yes, this is possible. The Quivr application has a method in the Brain class located in the backend/models/databases/supabase/brains.py file called delete_brain(self, brain_id: str). This method is used to delete a specific brain from the "brains" table in the database by matching the provided brain_id with the brain_id in the database and then executing the delete operation.

Here is the code for the method:

def delete_brain(self, brain_id: str):
    results = (
        self.db.table("brains").delete().match({"brain_id": brain_id}).execute()
    )

    return results

The method returns the results of the delete operation.

In addition to this, there are several other methods that handle the deletion of associations between the brain and other entities such as users and vectors. These methods include delete_brain_user_by_id, delete_brain_vector, delete_brain_users, and delete_brain_subscribers.

Please note that the actual process of deleting a brain may involve additional steps and checks, depending on the specific requirements of your application.

For more information, you can refer to the following sources:

I hope this information is helpful. If you have any other questions or need further clarification, please let me know.

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@mamadoudicko mamadoudicko changed the title 10. AAU, i can delete / unsubscribe from api_based brain [Brain as API] 10. AAU, i can delete / unsubscribe from api_based brain Nov 6, 2023
@mamadoudicko mamadoudicko self-assigned this Nov 6, 2023
coolCatalyst added a commit to coolCatalyst/quivr that referenced this issue Jun 1, 2024
Dream528 added a commit to Dream528/quivr that referenced this issue Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: backend Related to backend functionality or under the /backend directory user story Subdivision of an epic
Projects
None yet
Development

No branches or pull requests

2 participants