diff --git a/public/css/promptmanager.css b/public/css/promptmanager.css
index 746c03afb..b8c512539 100644
--- a/public/css/promptmanager.css
+++ b/public/css/promptmanager.css
@@ -29,6 +29,11 @@
color: var(--white50a);
}
+#completion_prompt_manager #completion_prompt_manager_list .completion_prompt_manager_prompt .completion_prompt_manager_prompt_name .fa-solid.fa-globe {
+ /* For a special kind of people */
+ padding-left: 0.4em;
+}
+
#completion_prompt_manager #completion_prompt_manager_list .completion_prompt_manager_prompt_invisible {
display: none;
}
diff --git a/public/scripts/PromptManager.js b/public/scripts/PromptManager.js
index a5007ab09..124595ec2 100644
--- a/public/scripts/PromptManager.js
+++ b/public/scripts/PromptManager.js
@@ -3,9 +3,7 @@ import {TokenHandler} from "./openai.js";
import {power_user} from "./power-user.js";
/**
- * Register migrations for the prompt manager when settings are loaded or an open ai preset is loaded.
- *
- * @function registerPromptManagerMigration
+ * Register migrations for the prompt manager when settings are loaded or an Open AI preset is loaded.
*/
const registerPromptManagerMigration = () => {
const migrate = (settings) => {
@@ -893,7 +891,8 @@ PromptManagerModule.prototype.getPromptIndexById = function (identifier) {
}
/**
- * Prepares a prompt by creating a new object with its role and content.
+ * Enriches a generic object, creating a new prompt object in the process
+ *
* @param {Object} prompt - Prompt object
* @param original
* @returns {Object} An object with "role" and "content" properties
@@ -967,6 +966,7 @@ PromptManagerModule.prototype.loadMessagesIntoInspectForm = function (messages)
let drawerHTML = `
@@ -1122,9 +1122,6 @@ PromptManagerModule.prototype.renderPromptManager = function () {
promptManagerDiv.insertAdjacentHTML('beforeend', `
${this.error ? errorDiv : ''}
diff --git a/public/scripts/openai.js b/public/scripts/openai.js
index b21505816..97237ba9e 100644
--- a/public/scripts/openai.js
+++ b/public/scripts/openai.js
@@ -629,8 +629,8 @@ function populateChatCompletion (prompts, chatCompletion, {bias, quietPrompt, ty
* @returns {Object} prompts - The prepared and merged system and user-defined prompts.
*/
function preparePromptsForChatCompletion(Scenario, charPersonality, name2, worldInfoBefore, worldInfoAfter, charDescription, quietPrompt, bias, extensionPrompts) {
- const scenarioText = Scenario ? `Circumstances and context of the dialogue: ${Scenario}` : '';
- const charPersonalityText = charPersonality ? `${name2}'s personality: ${charPersonality}` : '';
+ const scenarioText = Scenario ? `[Circumstances and context of the dialogue: ${Scenario}]` : '';
+ const charPersonalityText = charPersonality ? `[${name2}'s personality: ${charPersonality}]` : '';
// Create entries for system prompts
const systemPrompts = [
@@ -757,7 +757,7 @@ function prepareOpenAIMessages({
chatCompletion.setTokenBudget(userSettings.openai_max_context, userSettings.openai_max_tokens);
try {
- // Populate markers, merge markers and ordered user prompts with system prompts
+ // Merge markers and ordered user prompts with system prompts
const prompts = preparePromptsForChatCompletion(Scenario, charPersonality, name2, worldInfoBefore, worldInfoAfter, charDescription, quietPrompt, bias, extensionPrompts);
// Fill the chat completion with as much context as the budget allows
@@ -770,9 +770,9 @@ function prepareOpenAIMessages({
} else if (error instanceof InvalidCharacterNameError) {
toastr.warning('An error occurred while counting tokens: Invalid character name')
chatCompletion.log('Invalid character name');
- promptManager.error = 'The name of at least one character contained whitespaces or special characters. Please check your user and character name';
+ promptManager.error = 'The name of at least one character contained whitespaces or special characters. Please check your user and character name.';
} else {
- toastr.error('An unknown error occurred while counting tokens. Further information available in console.')
+ toastr.error('An unknown error occurred while counting tokens. Further information may be available in console.')
chatCompletion.log('Unexpected error:');
chatCompletion.log(error);
}
@@ -780,7 +780,7 @@ function prepareOpenAIMessages({
// Pass chat completion to prompt manager for inspection
promptManager.setChatCompletion(chatCompletion);
- // All information are up-to-date, render.
+ // All information is up-to-date, render.
if (false === dryRun) promptManager.render(false);
}