diff --git a/src/lang/en.ts b/src/lang/en.ts index 4e805d11..73325616 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -82,7 +82,7 @@ export const languageEnglish = { chatNote: "a note that strongly effects model behavior. embbedded to current chat. also known as memory or ujb.", personality: "A brief description about character's personality. \n\n**It is not recommended to use this option. Describe it in character description instead.**", scenario: "A brief description about character's scenario. \n\n**It is not recommended to use this option. Describe it in character description instead.**", - utilityBot: "When activated, it ignores main prompt. \n\n**It is not recommended to use this option. Modifiy system prompt instead.**", + utilityBot: "When activated, it ignores main prompt, jailbreak and other prompts. used for bot made for utility, not for roleplay.", loreSelective: "If Selective mode is toggled, both Activation Key and Secondary key should have a match to activate the lore.", loreRandomActivation: "If Use Probability Condition is abled, if the lore's other conditions are all met, the lore will be activated with a set probability which is set by 'Probability' each time a chat is sent.", additionalAssets: "Additional assets to display in your chat. \n\n - use `{{raw::}}` to use as path.\n - use `{{img::}}` to use as image\n - use `{{video::}}` to use as video\n - use `{{audio::}}` to use as audio\n - recommended to put in Background HTML", diff --git a/src/lang/vi.ts b/src/lang/vi.ts index 0c128f66..3f444efd 100644 --- a/src/lang/vi.ts +++ b/src/lang/vi.ts @@ -57,7 +57,6 @@ export const LanguageVietnamese = { "chatNote": "một lưu ý có ảnh hưởng mạnh mẽ đến hành vi của mô hình. được nhúng vào cuộc trò chuyện hiện tại. còn được gọi là bộ nhớ hoặc ujb.", "personality": "Mô tả ngắn gọn về tính cách nhân vật.\n\n**Không nên sử dụng tùy chọn này. Thay vào đó hãy mô tả nó bằng phần mô tả nhân vật.**", "scenario": "Một mô tả ngắn gọn về kịch bản của nhân vật.\n\n**Không nên sử dụng tùy chọn này. Thay vào đó hãy mô tả nó bằng phần mô tả nhân vật.**", - "utilityBot": "Khi được kích hoạt, nó sẽ bỏ qua lời nhắc chính.\n\n**Không nên sử dụng tùy chọn này. Thay vào đó, hãy sửa đổi lời nhắc của hệ thống.**", "loreSelective": "Nếu chế độ Chọn lọc được bật, cả Khóa kích hoạt và Khóa phụ phải khớp nhau để kích hoạt truyền thuyết.", "loreRandomActivation": "Nếu Điều kiện Xác suất Sử dụng được kích hoạt, nếu tất cả các điều kiện khác của truyền thuyết đều được đáp ứng, truyền thuyết sẽ được kích hoạt với một xác suất đã đặt được đặt bởi 'Xác suất' mỗi lần trò chuyện được gửi.", "additionalAssets": "Nội dung bổ sung để hiển thị trong cuộc trò chuyện của bạn.\n\n - sử dụng `{{raw::}}` để dùng làm đường dẫn.\n - sử dụng `{{img::}}` để sử dụng làm hình ảnh\n - sử dụng `{{video::}}` để sử dụng làm video\n - sử dụng `{{audio::}}` để sử dụng làm âm thanh\n - nên đặt HTML nền", diff --git a/src/lib/SideBars/CharConfig.svelte b/src/lib/SideBars/CharConfig.svelte index a5ffeeea..971bb746 100644 --- a/src/lib/SideBars/CharConfig.svelte +++ b/src/lib/SideBars/CharConfig.svelte @@ -773,12 +773,10 @@ - {#if $DataBase.showUnrecommended || currentChar.data.utilityBot} -
- - -
- {/if} +
+ + +
{#if currentChar.data.license !== 'CC BY-NC-SA 4.0' && currentChar.data.license !== 'CC BY-SA 4.0' diff --git a/src/ts/process/index.ts b/src/ts/process/index.ts index 5cb9a547..2d5d2a65 100644 --- a/src/ts/process/index.ts +++ b/src/ts/process/index.ts @@ -173,12 +173,42 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n 'personaPrompt':([] as OpenAIChat[]) } - const promptTemplate = cloneDeep(db.promptTemplate) + let promptTemplate = cloneDeep(db.promptTemplate) if(promptTemplate){ promptTemplate.push({ type: 'postEverything' }) } + if(currentChar.utilityBot){ + promptTemplate = [ + { + "type": "plain", + "text": "", + "role": "system", + "type2": "main" + }, + { + "type": "description", + }, + { + "type": "lorebook", + }, + { + "type": "chat", + "rangeStart": 0, + "rangeEnd": "end" + }, + { + "type": "plain", + "text": "", + "role": "system", + "type2": "globalNote" + }, + { + 'type': "postEverything" + } + ] + } if((!currentChar.utilityBot) && (!promptTemplate)){ const mainp = currentChar.systemPrompt?.replaceAll('{{original}}', db.mainPrompt) || db.mainPrompt