# from pymilvus import Collection, db, connections
# from pymilvus import utility
# conn = connections.connect(host="172.18.30.165", port=19530)
# db.using_database("XIAN")
# # result = utility.has_collection("RAGTest")
# # print(result)
# print(utility.list_collections())


from pymilvus import MilvusClient, DataType

client = MilvusClient(
    uri="http://172.18.30.165:19530",
    token="root:Milvus"
)
client.using_database("XIAN")

res = client.list_collections()
search_params = {
    "metric_type": "IP",  # 距离度量类型，如 L2/IP等
    "params": {"nprobe": 10}
}
res = client.describe_collection(
    collection_name="ce_shi_zhi_shi_ku_1_449853"
)

for hits in res:
    print(hits)
        # print(f"ID: {hit.id}, Distance: {hit.distance}, Vector: {hit.entity.get('vector_field_name')}")

