From 331bdc9da07087f433979c78f2525c762fb2ff3c Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Sat, 9 Dec 2023 23:01:55 +0100 Subject: [PATCH] improve ai notices --- commands/message/limited/bard.js | 6 +++--- commands/message/limited/chat.js | 2 +- commands/message/limited/disstrack.js | 2 +- commands/message/limited/palm.js | 2 +- commands/message/limited/summarize.js | 9 ++++----- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/commands/message/limited/bard.js b/commands/message/limited/bard.js index 18ef4bf..a86e213 100644 --- a/commands/message/limited/bard.js +++ b/commands/message/limited/bard.js @@ -65,7 +65,7 @@ module.exports = { }, description: description.join('\n'), footer: { - text: `Bard • This information may be inaccurate or biased` + text: `Bard • Generative AI is experimental. Response may be factually incorrect or biased.` } })], files @@ -105,7 +105,7 @@ module.exports = { }, description: description.join('\n'), footer: { - text: `Bard • This information may be inaccurate or biased` + text: `Bard • Generative AI is experimental. Response may be factually incorrect or biased.` } }) @@ -146,7 +146,7 @@ module.exports = { }, description: description.join('\n'), footer: { - text: `Bard • This information may be inaccurate or biased` + text: `Bard • Generative AI is experimental. Response may be factually incorrect or biased.` } }) diff --git a/commands/message/limited/chat.js b/commands/message/limited/chat.js index ef9cf87..16204a0 100644 --- a/commands/message/limited/chat.js +++ b/commands/message/limited/chat.js @@ -110,7 +110,7 @@ module.exports = { }, description: description.join('\n'), footer: { - text: `${MODELS[model.toLowerCase()].name} • This information may be inaccurate or biased` + text: `${MODELS[model.toLowerCase()].name} • Generative AI is experimental. Response may be factually incorrect or biased.` } })], files diff --git a/commands/message/limited/disstrack.js b/commands/message/limited/disstrack.js index edfed4d..a585044 100644 --- a/commands/message/limited/disstrack.js +++ b/commands/message/limited/disstrack.js @@ -39,7 +39,7 @@ module.exports = { return editOrReply(context, createEmbed("default", context, { description: smallIconPill("generative_ai", args.text) + '\n' + codeblock("ansi", [res.body.output.substr(0, 2020 - args.text.length)]), footer: { - text: `🗣🗣📢🔥🔥🔥🔥💯 • ${context.application.name}`, + text: `Generative AI is experimental. • ${context.application.name}`, iconUrl: STATICS.openai } })) diff --git a/commands/message/limited/palm.js b/commands/message/limited/palm.js index f678525..7275078 100644 --- a/commands/message/limited/palm.js +++ b/commands/message/limited/palm.js @@ -88,7 +88,7 @@ module.exports = { }, description: description.join('\n'), footer: { - text: `PaLM 2 • This information may be inaccurate or biased` + text: `PaLM 2 • Generative AI is experimental. Response may be factually incorrect or biased.` } })], files diff --git a/commands/message/limited/summarize.js b/commands/message/limited/summarize.js index a867fb5..d224921 100644 --- a/commands/message/limited/summarize.js +++ b/commands/message/limited/summarize.js @@ -1,15 +1,14 @@ const { createEmbed } = require('../../../labscore/utils/embed') const { editOrReply } = require('../../../labscore/utils/message') -const superagent = require('superagent') -const { codeblock, iconPill, smallIconPill } = require('../../../labscore/utils/markdown') +const { iconPill, smallIconPill } = require('../../../labscore/utils/markdown') const { Permissions } = require("detritus-client/lib/constants"); const { canUseLimitedTestCommands } = require('../../../labscore/utils/testing') -const { STATICS, STATIC_ICONS } = require('../../../labscore/utils/statics'); +const { STATIC_ICONS } = require('../../../labscore/utils/statics'); const { summarizeWebpage } = require('../../../labscore/api/obelisk'); -const URL_REGEX = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/ +const URL_REGEX = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([^> ]*)/ module.exports = { name: 'summarize', @@ -45,7 +44,7 @@ module.exports = { return editOrReply(context, createEmbed("defaultNoFooter", context, { author: { iconUrl: STATIC_ICONS.ai_summary, - name: res.response.body.title || '​', + name: res.response.body.title || 'Key points from the page', url: webUrl[0] }, description: '- ' + res.response.body.summaries.join('\n- '),