31 lines
625 B
Python
31 lines
625 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
简单删除 Qdrant 集合
|
|
"""
|
|
|
|
import sys
|
|
import os
|
|
|
|
project_root = os.path.join(os.path.dirname(__file__), "..", "..")
|
|
sys.path.insert(0, os.path.join(project_root, "backend"))
|
|
|
|
from rag_core.client import create_qdrant_client
|
|
|
|
|
|
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()
|