From 1de7462f7b6d1461aeddadd4351430a30820cb1d Mon Sep 17 00:00:00 2001 From: Julian Jelfs Date: Thu, 12 Dec 2024 12:16:11 +0000 Subject: [PATCH] tweak the way the bot is called --- frontend/openchat-client/src/openchat.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/openchat-client/src/openchat.ts b/frontend/openchat-client/src/openchat.ts index 8cd8046f20..30c7440107 100644 --- a/frontend/openchat-client/src/openchat.ts +++ b/frontend/openchat-client/src/openchat.ts @@ -7677,14 +7677,13 @@ export class OpenChat extends OpenChatAgentWorker { } private callBotEndpoint(bot: ExternalBotCommandInstance, token: string): Promise { - // This will send the OC access JWT to the external bot's endpoint const headers = new Headers(); headers.append("x-auth-jwt", token); headers.append("Content-type", "application/json"); - return fetch(`${bot.endpoint}/${bot.command.name}`, { + return fetch(`${bot.endpoint}/execute_command`, { method: "POST", headers: headers, - body: JSON.stringify(bot.command.params), + body: token, }).then((res) => { if (res.ok) { return res.json();