Add new prompt type 'postEverything'
This commit is contained in:
@@ -12,7 +12,8 @@ export const languageEnglish = {
|
|||||||
"description": "Character Description",
|
"description": "Character Description",
|
||||||
'personaPrompt':'Persona Prompt',
|
'personaPrompt':'Persona Prompt',
|
||||||
'plain': "Plain Prompt",
|
'plain': "Plain Prompt",
|
||||||
'memory': "Supa/HypaMemory"
|
'memory': "Supa/HypaMemory",
|
||||||
|
'postEverything': "End-Injected Prompts",
|
||||||
},
|
},
|
||||||
errors:{
|
errors:{
|
||||||
toomuchtoken: 'Error: The minimum required token is greater than the Max Context Size.',
|
toomuchtoken: 'Error: The minimum required token is greater than the Max Context Size.',
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
<OptionInput value="authornote">{language.formating.authorNote}</OptionInput>
|
<OptionInput value="authornote">{language.formating.authorNote}</OptionInput>
|
||||||
<OptionInput value="lorebook">{language.formating.lorebook}</OptionInput>
|
<OptionInput value="lorebook">{language.formating.lorebook}</OptionInput>
|
||||||
<OptionInput value="memory">{language.formating.memory}</OptionInput>
|
<OptionInput value="memory">{language.formating.memory}</OptionInput>
|
||||||
|
<OptionInput value="postEverything">{language.formating.postEverything}</OptionInput>
|
||||||
{#if $DataBase.proomptSettings.customChainOfThought}
|
{#if $DataBase.proomptSettings.customChainOfThought}
|
||||||
<OptionInput value="cot">{language.cot}</OptionInput>
|
<OptionInput value="cot">{language.cot}</OptionInput>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -182,10 +182,20 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
|
|||||||
let promptTemplate = cloneDeep(db.promptTemplate)
|
let promptTemplate = cloneDeep(db.promptTemplate)
|
||||||
const usingPromptTemplate = !!promptTemplate
|
const usingPromptTemplate = !!promptTemplate
|
||||||
if(promptTemplate){
|
if(promptTemplate){
|
||||||
|
let hasPostEverything = false
|
||||||
|
for(const card of promptTemplate){
|
||||||
|
if(card.type === 'postEverything'){
|
||||||
|
hasPostEverything = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!hasPostEverything){
|
||||||
promptTemplate.push({
|
promptTemplate.push({
|
||||||
type: 'postEverything'
|
type: 'postEverything'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(currentChar.utilityBot && (!(usingPromptTemplate && db.proomptSettings.utilOverride))){
|
if(currentChar.utilityBot && (!(usingPromptTemplate && db.proomptSettings.utilOverride))){
|
||||||
promptTemplate = [
|
promptTemplate = [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user