From 4b5d5f3b630fa6533365772befe30329bcfbac90 Mon Sep 17 00:00:00 2001 From: GooeyTuxedo Date: Fri, 7 Apr 2023 14:28:34 -0700 Subject: [PATCH] One liner to get around llama max length bug --- commands/system/chat.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/system/chat.js b/commands/system/chat.js index 128eb35..014b467 100644 --- a/commands/system/chat.js +++ b/commands/system/chat.js @@ -53,6 +53,8 @@ module.exports = { console.log(`Prompt: ${prompt.replace("+", " ")}\nResponse: ${response.data.answer}`); + if (!response.data.answer) throw new Error("Did not receive a reply. API error?") + interaction.editReply(response.data.answer); } catch (err) { console.error(err);