From f74a88651a6ca5ea4f0e5448e009189d998a6ecc Mon Sep 17 00:00:00 2001 From: Thomas Hansen Date: Mon, 16 Oct 2023 12:02:33 +0300 Subject: [PATCH] Configuration options for chatbot watermark --- backend/files/system/openai/front.files/chat/default.js | 3 ++- backend/files/system/openai/include-javascript.get.hl | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/files/system/openai/front.files/chat/default.js b/backend/files/system/openai/front.files/chat/default.js index 36dff47fff..00f2710f92 100644 --- a/backend/files/system/openai/front.files/chat/default.js +++ b/backend/files/system/openai/front.files/chat/default.js @@ -142,10 +142,11 @@ function aista_create_chat_ui() { if (ainiroRtl && ainiroRtl === true) { aistaChatWnd.dir = 'rtl'; } + const ainiroWatermarkContent = '[[ainiro_watermark]]'; aistaChatWnd.className = 'aista-chat-wnd'; let html = `
[[header]]
diff --git a/backend/files/system/openai/include-javascript.get.hl b/backend/files/system/openai/include-javascript.get.hl index 09f9fe3422..08fbbb175e 100644 --- a/backend/files/system/openai/include-javascript.get.hl +++ b/backend/files/system/openai/include-javascript.get.hl @@ -105,6 +105,12 @@ set-value:x:@.result strings.replace:x:@.result .:[[url]] get-value:x:@.url +set-value:x:@.result + strings.replace:x:@.result + .:[[ainiro_watermark]] + get-first-value + config.get:"magic:watermark" + .:"Powered by AINIRO.IO" set-value:x:@.result strings.replace:x:@.result .:[[recaptcha]]