diff --git a/src/interface/desktop/chat.html b/src/interface/desktop/chat.html
index 11f6f17d..b27bbc90 100644
--- a/src/interface/desktop/chat.html
+++ b/src/interface/desktop/chat.html
@@ -68,6 +68,8 @@
// Replace any ** with and __ with
newHTML = newHTML.replace(/\*\*([\s\S]*?)\*\*/g, '$1');
newHTML = newHTML.replace(/__([\s\S]*?)__/g, '$1');
+ // Remove any text between [INST] and tags. These are spurious instructions for the AI chat model.
+ newHTML = newHTML.replace(/\[INST\].+(<\/s>)?/g, '');
return newHTML;
}
@@ -168,6 +170,7 @@
function incrementalChat(event) {
if (!event.shiftKey && event.key === 'Enter') {
+ event.preventDefault();
chat();
}
}
@@ -291,8 +294,7 @@