from openapi import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.search.text_store.add_texts(store_name="<value>", x_api_key_id="<id>", x_user_id="<id>", x_exchange_jwt_external_user_id="<id>", texts=[
"Wireless noise-cancelling headphones with 30-hour battery life",
"USB-C charging cable with braided nylon sleeve",
"Portable 65W GaN wall charger with two USB-C ports",
], vectors=[
[
0.14,
-0.07,
0.31,
],
[
0.19,
-0.11,
0.27,
],
[
0.09,
-0.04,
0.22,
],
], group="electronics_q1_2026")
# Handle response
print(res){
"added_count": 3,
"message": "Successfully added 3 texts (skipped 0 duplicates)",
"skipped_count": 0
}Adicione textos a uma loja com um identificador de grupo
from openapi import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.search.text_store.add_texts(store_name="<value>", x_api_key_id="<id>", x_user_id="<id>", x_exchange_jwt_external_user_id="<id>", texts=[
"Wireless noise-cancelling headphones with 30-hour battery life",
"USB-C charging cable with braided nylon sleeve",
"Portable 65W GaN wall charger with two USB-C ports",
], vectors=[
[
0.14,
-0.07,
0.31,
],
[
0.19,
-0.11,
0.27,
],
[
0.09,
-0.04,
0.22,
],
], group="electronics_q1_2026")
# Handle response
print(res){
"added_count": 3,
"message": "Successfully added 3 texts (skipped 0 duplicates)",
"skipped_count": 0
}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>.
Solicitação para adicionar textos a uma loja.
Esta página foi útil?