Skip to main content

@wildix/xbees-users-client > UpdateBotCallbackCommand

UpdateBotCallbackCommand class

Signature:

export declare class UpdateBotCallbackCommand extends UpdateBotCallbackCommand_base 

Extends: UpdateBotCallbackCommand_base

Example

Use a bare-bones client and the command you need to make an API call.

import { UsersClient, UpdateBotCallbackCommand } from "@wildix/xbees-users-client"; // ES Modules import
// const { UsersClient, UpdateBotCallbackCommand } = require("@wildix/xbees-users-client"); // CommonJS import
const client = new UsersClient(config);
const input = { // UpdateBotCallbackInput
company: "STRING_VALUE",
botId: "STRING_VALUE", // required
callback: { // BotCallback
endpoint: { // BotEndpoint Union: only one key present
llm: { // BotLlmEndpoint
prompt: "STRING_VALUE", // required
embeddedTools: [ // BotLlmEmbeddedToolsList
{ // BotLlmEmbeddedTool
type: "HANDOVER" || "DELEGATE" || "SUGGESTIONS", // required
name: "STRING_VALUE", // required
parameters: "DOCUMENT_VALUE",
},
],
tools: [ // BotLlmToolsList
{ // BotLlmTool
type: "function", // required
function: { // BotLlmFunctionDefinition
name: "STRING_VALUE", // required
description: "STRING_VALUE",
parameters: "DOCUMENT_VALUE",
integration: { // BotLlmFunctionIntegration Union: only one key present
webhook: { // BotLlmFunctionIntegrationWebhook
url: "STRING_VALUE", // required
method: "get" || "post" || "put" || "delete" || "patch",
async: true || false,
authorization: { // BotLlmFunctionIntegrationWebhookAuthorization Union: only one key present
bearer: { // BotLlmFunctionIntegrationWebhookAuthorizationBearer
token: "STRING_VALUE", // required
},
basic: { // BotLlmFunctionIntegrationWebhookAuthorizationBasic
username: "STRING_VALUE", // required
password: "STRING_VALUE", // required
},
oauth: { // BotLlmFunctionIntegrationWebhookAuthorizationOAuth
clientId: "STRING_VALUE", // required
clientSecret: "STRING_VALUE", // required
endpointUrl: "STRING_VALUE", // required
scope: "STRING_VALUE",
},
},
headers: [ // BotLlmFunctionIntegrationWebhookHeadersList
{ // BotLlmFunctionIntegrationWebhookHeader
key: "STRING_VALUE", // required
value: "STRING_VALUE", // required
},
],
parameters: "DOCUMENT_VALUE",
},
},
},
},
],
},
dialogflowCx: { // BotDialogflowCxEndpoint
credentials: "DOCUMENT_VALUE", // required
agent: "STRING_VALUE", // required
location: "STRING_VALUE", // required
language: "STRING_VALUE", // required
},
openAiAssistant: { // BotOpenAiAssistantEndpoint
key: "STRING_VALUE", // required
assistantId: "STRING_VALUE", // required
},
webhook: { // BotWebhookEndpoint
url: "STRING_VALUE", // required
secret: "STRING_VALUE", // required
},
sqs: { // BotSqsEndpoint
url: "STRING_VALUE", // required
key: "STRING_VALUE", // required
secret: "STRING_VALUE", // required
},
},
},
};
const command = new UpdateBotCallbackCommand(input);
const response = await client.send(command);
// { // UpdateBotCallbackOutput
// callback: { // BotCallback
// endpoint: { // BotEndpoint Union: only one key present
// llm: { // BotLlmEndpoint
// prompt: "STRING_VALUE", // required
// embeddedTools: [ // BotLlmEmbeddedToolsList
// { // BotLlmEmbeddedTool
// type: "HANDOVER" || "DELEGATE" || "SUGGESTIONS", // required
// name: "STRING_VALUE", // required
// parameters: "DOCUMENT_VALUE",
// },
// ],
// tools: [ // BotLlmToolsList
// { // BotLlmTool
// type: "function", // required
// function: { // BotLlmFunctionDefinition
// name: "STRING_VALUE", // required
// description: "STRING_VALUE",
// parameters: "DOCUMENT_VALUE",
// integration: { // BotLlmFunctionIntegration Union: only one key present
// webhook: { // BotLlmFunctionIntegrationWebhook
// url: "STRING_VALUE", // required
// method: "get" || "post" || "put" || "delete" || "patch",
// async: true || false,
// authorization: { // BotLlmFunctionIntegrationWebhookAuthorization Union: only one key present
// bearer: { // BotLlmFunctionIntegrationWebhookAuthorizationBearer
// token: "STRING_VALUE", // required
// },
// basic: { // BotLlmFunctionIntegrationWebhookAuthorizationBasic
// username: "STRING_VALUE", // required
// password: "STRING_VALUE", // required
// },
// oauth: { // BotLlmFunctionIntegrationWebhookAuthorizationOAuth
// clientId: "STRING_VALUE", // required
// clientSecret: "STRING_VALUE", // required
// endpointUrl: "STRING_VALUE", // required
// scope: "STRING_VALUE",
// },
// },
// headers: [ // BotLlmFunctionIntegrationWebhookHeadersList
// { // BotLlmFunctionIntegrationWebhookHeader
// key: "STRING_VALUE", // required
// value: "STRING_VALUE", // required
// },
// ],
// parameters: "DOCUMENT_VALUE",
// },
// },
// },
// },
// ],
// },
// dialogflowCx: { // BotDialogflowCxEndpoint
// credentials: "DOCUMENT_VALUE", // required
// agent: "STRING_VALUE", // required
// location: "STRING_VALUE", // required
// language: "STRING_VALUE", // required
// },
// openAiAssistant: { // BotOpenAiAssistantEndpoint
// key: "STRING_VALUE", // required
// assistantId: "STRING_VALUE", // required
// },
// webhook: { // BotWebhookEndpoint
// url: "STRING_VALUE", // required
// secret: "STRING_VALUE", // required
// },
// sqs: { // BotSqsEndpoint
// url: "STRING_VALUE", // required
// key: "STRING_VALUE", // required
// secret: "STRING_VALUE", // required
// },
// },
// },
// };