added new endpoint

pull/577/head
shivanandmn 12 months ago
parent ca3e549dd4
commit 2e95666939

@ -84,6 +84,19 @@ def api_feedback():
)
return {"status": http.client.responses.get(response.status_code, "ok")}
@user.route("/api/delete_by_ids", methods=["get"])
def delete_by_ids():
"""Delete by ID. These are the IDs in the vectorstore"""
ids = request.args.get("path")
if not ids:
return {"status": "error"}
if settings.VECTOR_STORE == "faiss":
result = vectors_collection.delete_index(ids=ids)
if result:
return {"status": "ok"}
return {"status": "error"}
@user.route("/api/delete_old", methods=["get"])
def delete_old():

Loading…
Cancel
Save