Hi, Is there any way to clear the whole persistence db for a project_name using code? Currently I'm manually clearing the database from UI and looking for a way to do it automatically using code.
Yes, you can clear the entire persistence database for a specific project_name using the clear_project mutation in Phoenix. This mutation allows you to delete all traces associated with a project. Here's an example of how to use it: LBKSmutation { clearProject(id: "YOUR_PROJECT_ID") { projects { edges { node { ... on Project { name traceCount } } } } } }LBKSAlternatively, you can use the delete_projects function to delete projects by their names: LBKSfrom phoenix.server.api.utils import delete_projects from phoenix.server.types import DbSessionFactoryLBKSasync def clear_project_by_name(db: DbSessionFactory, project_name: str): await delete_projects(db, project_name)LBKSWould you like more detail?Sources:
- ProjectMutationMixin
馃挕聽Hint: Mention RunLLM in the thread for followups.