MCPcopy Create free account
hub / github.com/cosdata/cosdata / create_db

Function create_db

tests/test-sparse-vector.py:48–58  ·  view source on GitHub ↗

Create collection using cosdata client

(name, description=None, dimension=20000)

Source from the content-addressed store, hash-verified

46
47
48def create_db(name, description=None, dimension=20000):
49 """Create collection using cosdata client"""
50 collection = client.create_collection(
51 name=name,
52 dimension=dimension,
53 description=description,
54 sparse_vector={"enabled": True},
55 dense_vector={"enabled": False, "dimension": dimension},
56 tf_idf_options={"enabled": False},
57 )
58 return collection
59
60
61def create_explicit_index(collection):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected