from openapi import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.search.tables.search_data(table_name="<value>", operations=[
{
"type": "vector_search",
"field": "embedding",
"vector": [
0.11,
-0.06,
0.37,
],
"distance_type": "cosine",
"limit": 5,
},
{
"type": "filter",
"expression": "category = 'security'",
"prefilter": True,
},
], return_columns=[
"id",
"content",
"category",
"rating",
])
# Handle response
print(res){
"operations_applied": [
"vector_search",
"filter",
"limit"
],
"results": [
{
"_distance": 0.102,
"category": "account",
"content": "Reset your password from the account settings page.",
"id": "doc_001",
"rating": 4.7
}
],
"search_time_ms": 18,
"total": 1
}Realizar operações de busca em uma tabela.
from openapi import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.search.tables.search_data(table_name="<value>", operations=[
{
"type": "vector_search",
"field": "embedding",
"vector": [
0.11,
-0.06,
0.37,
],
"distance_type": "cosine",
"limit": 5,
},
{
"type": "filter",
"expression": "category = 'security'",
"prefilter": True,
},
], return_columns=[
"id",
"content",
"category",
"rating",
])
# Handle response
print(res){
"operations_applied": [
"vector_search",
"filter",
"limit"
],
"results": [
{
"_distance": 0.102,
"category": "account",
"content": "Reset your password from the account settings page.",
"id": "doc_001",
"rating": 4.7
}
],
"search_time_ms": 18,
"total": 1
}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
Was this page helpful?