2026-05-04 04:28:32 +08:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
"""
|
|
|
|
|
简单删除 Qdrant 集合
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
import os
|
|
|
|
|
|
2026-05-04 12:55:45 +08:00
|
|
|
from backend.rag_core.client import create_qdrant_client
|
2026-05-04 04:28:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def delete_collection():
|
|
|
|
|
print("="*70)
|
|
|
|
|
print("删除 rag_documents 集合...")
|
|
|
|
|
print("="*70)
|
|
|
|
|
|
|
|
|
|
client = create_qdrant_client()
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
client.delete_collection("rag_documents")
|
|
|
|
|
print("✅ 删除成功")
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print(f"⚠️ 删除失败: {e}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
delete_collection()
|