[fix] prompt template and autosuggest

This commit is contained in:
aegkmq
2023-08-02 21:14:24 +09:00
parent 59dea11635
commit 838eaf81c8
4 changed files with 14 additions and 21 deletions

View File

@@ -77,16 +77,14 @@
if($DataBase.subModel === "textgen_webui"){
promptbody = [
...lastMessages.map(({ role, data }) => ({
role: role === "user" ? "user" as const : "assistant" as const,
content: data,
})),
{
role: 'system',
content: replacePlaceholders($DataBase.autoSuggestPrompt, currentChar.name)
},
{
role: 'user',
content: lastMessages.map(({ role, data }) => `${
role === 'char' ? currentChar.name : $DataBase.username
}: ${data}`).join("\n\n") + `\n\n${$DataBase.username}:`
},
]
}