[feat] send as original role
This commit is contained in:
@@ -472,5 +472,5 @@ export const languageEnglish = {
|
||||
sendName: "Send Name on Non-group Chat",
|
||||
utilOverride: "Utility Override",
|
||||
template: "Template",
|
||||
|
||||
chatAsOriginalOnSystem: "Send as original role"
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
import CheckInput from "./GUI/CheckInput.svelte";
|
||||
import { ArrowDown, ArrowUp, XIcon } from "lucide-svelte";
|
||||
import TextInput from "./GUI/TextInput.svelte";
|
||||
import { DataBase } from "src/ts/storage/database";
|
||||
export let proompt:Proompt
|
||||
export let onRemove:() => void = () => {}
|
||||
export let moveUp:() => void = () => {}
|
||||
@@ -78,6 +79,9 @@
|
||||
}
|
||||
}} />
|
||||
{/if}
|
||||
{#if $DataBase.proomptSettings.sendChatAsSystem}
|
||||
<CheckInput name={language.chatAsOriginalOnSystem} bind:check={proompt.chatAsOriginalOnSystem}/>
|
||||
{/if}
|
||||
{/if}
|
||||
{#if proompt.type === 'authornote'}
|
||||
<span>{language.defaultPrompt}</span>
|
||||
|
||||
@@ -455,7 +455,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
|
||||
}
|
||||
let chats = unformated.chats.slice(start, end)
|
||||
|
||||
if(usingPromptTemplate && db.proomptSettings.sendChatAsSystem){
|
||||
if(usingPromptTemplate && db.proomptSettings.sendChatAsSystem && (!card.chatAsOriginalOnSystem)){
|
||||
chats = systemizeChat(chats)
|
||||
}
|
||||
await tokenizeChatArray(chats)
|
||||
@@ -809,7 +809,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
|
||||
}
|
||||
|
||||
let chats = unformated.chats.slice(start, end)
|
||||
if(usingPromptTemplate && db.proomptSettings.sendChatAsSystem){
|
||||
if(usingPromptTemplate && db.proomptSettings.sendChatAsSystem && (!card.chatAsOriginalOnSystem)){
|
||||
chats = systemizeChat(chats)
|
||||
}
|
||||
pushPrompts(chats)
|
||||
|
||||
@@ -33,6 +33,7 @@ export interface ProomptChat {
|
||||
type: 'chat';
|
||||
rangeStart: number;
|
||||
rangeEnd: number|'end';
|
||||
chatAsOriginalOnSystem?: boolean;
|
||||
}
|
||||
|
||||
export async function tokenizePreset(proompts:Proompt[], consti:boolean = false){
|
||||
|
||||
Reference in New Issue
Block a user