from openapi import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.search.tables.get_table_schema(table_name="<value>")
# Handle response
print(res){
"indices": [
{
"config": {
"type": "FTS"
},
"field": "content",
"index_type": "FTS"
},
{
"config": {
"distance_type": "cosine",
"num_partitions": 128,
"type": "IVF_FLAT"
},
"field": "embedding",
"index_type": "IVF_FLAT"
}
],
"schema": {
"fields": [
{
"name": "id",
"nullable": false,
"type": "string"
},
{
"index": "FTS",
"name": "content",
"nullable": false,
"type": "string"
},
{
"name": "category",
"nullable": false,
"type": "string"
},
{
"name": "rating",
"nullable": true,
"type": "float"
},
{
"dimensions": 3,
"name": "embedding",
"nullable": false,
"type": "vector"
}
]
},
"stats": {
"num_deleted_rows": 12,
"num_rows": 1250
},
"table_name": "support_kb"
}Obter o esquema da tabela e metadados.
from openapi import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.search.tables.get_table_schema(table_name="<value>")
# Handle response
print(res){
"indices": [
{
"config": {
"type": "FTS"
},
"field": "content",
"index_type": "FTS"
},
{
"config": {
"distance_type": "cosine",
"num_partitions": 128,
"type": "IVF_FLAT"
},
"field": "embedding",
"index_type": "IVF_FLAT"
}
],
"schema": {
"fields": [
{
"name": "id",
"nullable": false,
"type": "string"
},
{
"index": "FTS",
"name": "content",
"nullable": false,
"type": "string"
},
{
"name": "category",
"nullable": false,
"type": "string"
},
{
"name": "rating",
"nullable": true,
"type": "float"
},
{
"dimensions": 3,
"name": "embedding",
"nullable": false,
"type": "vector"
}
]
},
"stats": {
"num_deleted_rows": 12,
"num_rows": 1250
},
"table_name": "support_kb"
}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>.
Esta página foi útil?