ragserver/wwwroot/knowledge_bases_list/delete_tree_item.dspy

8 lines
308 B
Plaintext

ns = params_kw.copy()
db = DBPools()
dbname = get_module_dbname('rag')
async with db.sqlorContext(dbname) as sor:
await sor.sqlExe("DELETE FROM document_chunks WHERE id=${id}$", {"id": ns.get("id","")})
result = {"widgettype": "Message", "options": {"user_data": {"id": ns.get("id","")}}}
result