File size: 525 Bytes
d8688d6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from pymilvus import MilvusClient
from pymilvus import (
    connections,
    utility,
    FieldSchema, CollectionSchema, DataType,
    Collection,
)

# 1. Create a milvus client
client = MilvusClient(
    uri="http://localhost:19530",
    token="root:Milvus"
)

# 2. Create a collection
client.drop_collection(collection_name="fy2025_budget_statement")

# 3. List collections
print(client.list_collections() )

# ['test_collection']

"""
res = client.get(
    collection_name="colpali",
    ids=[0, 1, 2],
)

print(res)
"""