[fix] lore activation without first key
This commit is contained in:
@@ -65,7 +65,7 @@ export const languageEnglish = {
|
|||||||
+ "\n\nExample format of conversations:"
|
+ "\n\nExample format of conversations:"
|
||||||
+ "\n\n```\n<START>\n{{user}}: hi\n{{char}}: hello\n<START>\n{{user}}: hi\nHaruhi: hello\n```"
|
+ "\n\n```\n<START>\n{{user}}: hi\n{{char}}: hello\n<START>\n{{user}}: hi\nHaruhi: hello\n```"
|
||||||
+ "\n\n```<START>``` Marks the beginning of a new conversation.",
|
+ "\n\n```<START>``` Marks the beginning of a new conversation.",
|
||||||
creatorQuotes: "Quote that appearances on top of first message. Used to inform users about this character. It doesn't go into prompt.",
|
creatorQuotes: "Note that appearances on top of first message. Used to inform users about this character. It doesn't go into prompt.",
|
||||||
systemPrompt: "A prompt that replaces main prompt in settings if its not blank.",
|
systemPrompt: "A prompt that replaces main prompt in settings if its not blank.",
|
||||||
chatNote: "a note that strongly effects model behavior. embbedded to current chat. also known as memory.",
|
chatNote: "a note that strongly effects model behavior. embbedded to current chat. also known as memory.",
|
||||||
personality: "A brief description about character's personality. \n\n**It is not recommended to use this option. Describe it in character description instead.**",
|
personality: "A brief description about character's personality. \n\n**It is not recommended to use this option. Describe it in character description instead.**",
|
||||||
@@ -225,7 +225,7 @@ export const languageEnglish = {
|
|||||||
loadLatest: "Load Latest Backup",
|
loadLatest: "Load Latest Backup",
|
||||||
loadOthers: "Load Other Backups",
|
loadOthers: "Load Other Backups",
|
||||||
exampleMessage: "Example Message",
|
exampleMessage: "Example Message",
|
||||||
creatorNotes: "Creator's Quote",
|
creatorNotes: "Creator's Comment",
|
||||||
systemPrompt: "System Prompt",
|
systemPrompt: "System Prompt",
|
||||||
characterNotes: "Character Notes",
|
characterNotes: "Character Notes",
|
||||||
personality: "Personality",
|
personality: "Personality",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="flex w-full justify-center">
|
<div class="flex w-full justify-center">
|
||||||
<div class="w-3xl max-w-80p bg-darkbg rounded-md p-3 text-white text-sm">
|
<div class="w-3xl max-w-80p bg-darkbg rounded-md p-3 text-white text-sm">
|
||||||
<h1 class="text-xl font-bold mb-2">Creator's Quote
|
<h1 class="text-xl font-bold mb-2">{language.creatorNotes}
|
||||||
<button class="float-right" on:click={onRemove}>
|
<button class="float-right" on:click={onRemove}>
|
||||||
<XIcon />
|
<XIcon />
|
||||||
</button>
|
</button>
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { XIcon } from "lucide-svelte";
|
import { XIcon } from "lucide-svelte";
|
||||||
|
import { language } from "src/lang";
|
||||||
import { ParseMarkdown } from "src/ts/parser";
|
import { ParseMarkdown } from "src/ts/parser";
|
||||||
|
|
||||||
export let onRemove: () => void
|
export let onRemove: () => void
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
value.secondkey = value.secondkey ?? ''
|
value.secondkey = value.secondkey ?? ''
|
||||||
open = !open
|
open = !open
|
||||||
}}>
|
}}>
|
||||||
<span>{value.comment.length === 0 ? 'Unnamed Lore' : value.comment}</span>
|
<span>{value.comment.length === 0 ? value.key.length === 0 ? "Unnamed Lore" : value.key : value.comment}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="valuer" on:click={async () => {
|
<button class="valuer" on:click={async () => {
|
||||||
const d = await alertConfirm(language.removeConfirm + value.comment)
|
const d = await alertConfirm(language.removeConfirm + value.comment)
|
||||||
|
|||||||
@@ -102,15 +102,16 @@ export async function loadLoreBookPrompt(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(firstKeyActivation && lore.secondKey.length === 0){
|
if(firstKeyActivation){
|
||||||
activatiedPrompt.push(lore.content)
|
if(lore.secondKey.length === 0){
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
for(const key of lore.secondKey){
|
|
||||||
if(formatedChat.includes(key)){
|
|
||||||
activatiedPrompt.push(lore.content)
|
activatiedPrompt.push(lore.content)
|
||||||
break
|
continue
|
||||||
|
}
|
||||||
|
for(const key of lore.secondKey){
|
||||||
|
if(formatedChat.includes(key)){
|
||||||
|
activatiedPrompt.push(lore.content)
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user