[fix] local model's prompt template
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
let lastMessages:Message[] = messages.slice(Math.max(messages.length - 10, 0));
|
||||
if(lastMessages.length === 0)
|
||||
return
|
||||
const promptbody:OpenAIChat[] = [
|
||||
let promptbody:OpenAIChat[] = [
|
||||
{
|
||||
role:'system',
|
||||
content: replacePlaceholders($DataBase.autoSuggestPrompt, currentChar.name)
|
||||
@@ -75,6 +75,21 @@
|
||||
}
|
||||
]
|
||||
|
||||
if($DataBase.subModel === "textgen_webui"){
|
||||
promptbody = [
|
||||
{
|
||||
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}:`
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
progress = true
|
||||
progressChatPage = chatPage
|
||||
abortController = new AbortController()
|
||||
|
||||
Reference in New Issue
Block a user