from openapi import SDK, models
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.search.tables.create_indices(table_name="<value>", indices=[
models.IndexRequest(
field="embedding",
config=models.IvfFlatIndexConfig(
distance_type="cosine",
num_partitions=128,
max_iterations=50,
sample_rate=256,
reindex_after=3600,
),
),
])
# Handle response
print(res){
"indices_created": [
{
"config": {
"distance_type": "cosine",
"num_partitions": 128,
"type": "IVF_FLAT"
},
"field": "embedding",
"index_type": "IVF_FLAT"
}
],
"message": "Successfully created 1 indices"
}Crear índices en la tabla especificada.
from openapi import SDK, models
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.search.tables.create_indices(table_name="<value>", indices=[
models.IndexRequest(
field="embedding",
config=models.IvfFlatIndexConfig(
distance_type="cosine",
num_partitions=128,
max_iterations=50,
sample_rate=256,
reindex_after=3600,
),
),
])
# Handle response
print(res){
"indices_created": [
{
"config": {
"distance_type": "cosine",
"num_partitions": 128,
"type": "IVF_FLAT"
},
"field": "embedding",
"index_type": "IVF_FLAT"
}
],
"message": "Successfully created 1 indices"
}Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Show child attributes
¿Esta página le ayudó?