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

Function create_explicit_index

tests/test-usv.py:64–69  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

62
63
64def create_explicit_index(name):
65 url = f"{client.base_url}/collections/{name}/indexes/usv"
66 data = {"name": name, "quantization": 64, "sample_threshold": 1000}
67 response = requests.post(url, headers=client._get_headers(), data=json.dumps(data), verify=client.verify_ssl)
68 if response.status_code not in [200, 201]:
69 raise Exception(f"Failed to create USV index: {response.text}")
70
71
72def create_transaction(name):

Callers 1

mainFunction · 0.70

Calls 1

_get_headersMethod · 0.45

Tested by

no test coverage detected