diff --git a/client/js/chat.js b/client/js/chat.js index a024a7e..91ae8b1 100644 --- a/client/js/chat.js +++ b/client/js/chat.js @@ -3,6 +3,7 @@ import { showAlert } from './shared_functions.js'; let chatCount = 0; // Zähler für Chat-Sessions let currentChatId = null; // Aktuell angezeigte Chat-ID let useMarkdown = true; +let sysprompt = "You are a knowledgeable assistant."; document.getElementById('newChatButton').addEventListener('click', () => { createNewChat(); @@ -268,7 +269,7 @@ async function stream_api_open_ai(userMessage) { botMessageDiv.className = 'chat-message assistant'; chatBox.prepend(botMessageDiv); - let send_message_system = [{ role: "system", content: "You are a knowledgeable assistant." }]; + let send_message_system = [{ role: "system", content: sysprompt }]; let send_message_user = getAllCurrentChatMessages(); let send_message_final = send_message_system.concat(send_message_user) console.log(send_message_final) @@ -342,7 +343,7 @@ function formatArrayToCustomString(array) { // Tokenizer async function tokenize_api_open_ai() { - let send_message_system = [{ role: "system", content: "You are a knowledgeable assistant." }]; + let send_message_system = [{ role: "system", content: sysprompt }]; let send_message_user = getAllCurrentChatMessages(); let send_message_final = send_message_system.concat(send_message_user) let formattedString = `"${formatArrayToCustomString(send_message_final)}"`;