Pular para o conteúdo principal
POST
/
api
/
v1
/
search
/
tables
/
{table_name}
/
data
Python (SDK)
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
}

Autorizações

Authorization
string
header
obrigatório

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>.

Parâmetros de caminho

table_name
string
obrigatório

Corpo

application/json
data
Data · object[]
obrigatório
refresh
boolean
padrão:true

Atualize os índices não vetoriais. Quaisquer índices vetoriais devem ser recriados manualmente por meio do endpoint create_indices.

Resposta

Resposta Bem-Sucedida

version
integer
obrigatório
count
integer
obrigatório
message
string
obrigatório