from openapi import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.search.tables.insert_data(table_name="<value>", data=[
{
"category": "account",
"content": "Reset your password from the account settings page.",
"embedding": [
0.13,
-0.09,
0.41,
],
"id": "doc_001",
"rating": 4.7,
},
{
"category": "security",
"content": "Use two-factor authentication for added account security.",
"embedding": [
0.07,
-0.02,
0.36,
],
"id": "doc_002",
"rating": 4.9,
},
], refresh=True)
# Handle response
print(res){
"count": 2,
"message": "Successfully inserted 2 records into support_kb",
"version": 3
}Insira os dados na tabela especificada.
from openapi import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.search.tables.insert_data(table_name="<value>", data=[
{
"category": "account",
"content": "Reset your password from the account settings page.",
"embedding": [
0.13,
-0.09,
0.41,
],
"id": "doc_001",
"rating": 4.7,
},
{
"category": "security",
"content": "Use two-factor authentication for added account security.",
"embedding": [
0.07,
-0.02,
0.36,
],
"id": "doc_002",
"rating": 4.9,
},
], refresh=True)
# Handle response
print(res){
"count": 2,
"message": "Successfully inserted 2 records into support_kb",
"version": 3
}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?