Add new prompt type 'postEverything'

This commit is contained in:
kwaroran
2024-03-05 01:54:55 +09:00
parent c2352d49fd
commit 18fbaebd46
3 changed files with 16 additions and 4 deletions

View File

@@ -12,7 +12,8 @@ export const languageEnglish = {
"description": "Character Description",
'personaPrompt':'Persona Prompt',
'plain': "Plain Prompt",
'memory': "Supa/HypaMemory"
'memory': "Supa/HypaMemory",
'postEverything': "End-Injected Prompts",
},
errors:{
toomuchtoken: 'Error: The minimum required token is greater than the Max Context Size.',

View File

@@ -42,6 +42,7 @@
<OptionInput value="authornote">{language.formating.authorNote}</OptionInput>
<OptionInput value="lorebook">{language.formating.lorebook}</OptionInput>
<OptionInput value="memory">{language.formating.memory}</OptionInput>
<OptionInput value="postEverything">{language.formating.postEverything}</OptionInput>
{#if $DataBase.proomptSettings.customChainOfThought}
<OptionInput value="cot">{language.cot}</OptionInput>
{/if}

View File

@@ -182,9 +182,19 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
let promptTemplate = cloneDeep(db.promptTemplate)
const usingPromptTemplate = !!promptTemplate
if(promptTemplate){
promptTemplate.push({
type: 'postEverything'
})
let hasPostEverything = false
for(const card of promptTemplate){
if(card.type === 'postEverything'){
hasPostEverything = true
break
}
}
if(!hasPostEverything){
promptTemplate.push({
type: 'postEverything'
})
}
}
if(currentChar.utilityBot && (!(usingPromptTemplate && db.proomptSettings.utilOverride))){
promptTemplate = [