Skip to content

Commit

Permalink
Configuration options for chatbot watermark
Browse files Browse the repository at this point in the history
  • Loading branch information
polterguy committed Oct 16, 2023
1 parent a73e4c7 commit f74a886
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/files/system/openai/front.files/chat/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = `
<div class="ainiro-powered-by" style="display: none">
Powered by <a href="https://ainiro.io" target="_blank">AINIRO.IO</a>
${ainiroWatermarkContent}
</div>
<div class="aista-chat-header">[[header]]</div>
<div class="aista-chat-msg-container"></div>
Expand Down
6 changes: 6 additions & 0 deletions backend/files/system/openai/include-javascript.get.hl
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href=\"https://ainiro.io\" target=\"_blank\">AINIRO.IO</a>"
set-value:x:@.result
strings.replace:x:@.result
.:[[recaptcha]]
Expand Down

0 comments on commit f74a886

Please sign in to comment.