Skip to content

Commit

Permalink
Remove AgentTools when Tool is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
homanp committed Aug 22, 2023
1 parent 1977786 commit cbf5152
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/api/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ async def read_tool(toolId: str, token=Depends(JWTBearer())):
async def delete_tool(toolId: str, token=Depends(JWTBearer())):
"""Delete tool endpoint"""
try:
prisma.agenttool.delete_many(where={"toolId": toolId})
prisma.tool.delete(where={"id": toolId})
return {"success": True, "data": None}
except Exception as e:
Expand Down

0 comments on commit cbf5152

Please sign in to comment.