Qdrant: Create new collection
qdrant_create_new_collection.Rd
qdrant_create_new_collection
establishes a connection with a qdrant instance and creates a new collection.
'
Usage
qdrant_create_new_collection(
conn,
collection_name = NA_character_,
vectors = list(size = 384, distance = "Cosine")
)
Arguments
- conn
a connection object created by get_qdrant_connection()
- collection_name
the name of the collection you want to create. Defaults to NA.
- vectors
a R list object that needs to contain 'size' and 'distance'. Defaults to size=384 and distance='Cosine' This needs to be adapted to the embedding model you use. Different models have different resulting vector sizes.
Details
Creates a new collection for vector embeddings. You can customize the size of embeddings needed and the type of distance for similarity search. If a collection already exists with the same name it will throw an error.
Examples
conn <- get_qdrant_connection()
#> → Connection to Qdrant confirmed
qdrant_create_new_collection(conn, collection_name="story_of_my_life")
#> → Collection story_of_my_life was just created on the qdrant instance.
qdrant_delete_collection(conn, collection_name="story_of_my_life")
#> → Collection story_of_my_life was just deleted on the qdrant instance.