From 83c0e6944bf9e073db0a2cd014ec816ab7e8fa6c Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Wed, 13 Sep 2023 14:45:41 +0200 Subject: [PATCH] limit length of the displayed prompt --- commands/message/fun/chat.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/message/fun/chat.js b/commands/message/fun/chat.js index f56542d..5b1dc89 100644 --- a/commands/message/fun/chat.js +++ b/commands/message/fun/chat.js @@ -58,6 +58,7 @@ module.exports = { temperatureDisplay = " " + smallIconPill("example", temperature) } + try{ await editOrReply(context, createEmbed("ai", context, "Generating response...")) @@ -72,7 +73,10 @@ module.exports = { model }) - let description = [smallIconPill("generative_ai", args.text) + modelDisplay + temperatureDisplay, ''] + let inputDisplay = args.text + if(inputDisplay.length >= 50) inputDisplay = inputDisplay.substr(0,50) + '...' + + let description = [smallIconPill("generative_ai", inputDisplay) + modelDisplay + temperatureDisplay, ''] let files = []; if(!res.body.output) res.body.output = '[Empty Response]'