Use two @ instead of three @ for consistancy

This commit is contained in:
kwaroran
2024-01-15 12:38:31 +09:00
parent bf886325ed
commit a1c6cbdf24
2 changed files with 18 additions and 5 deletions

View File

@@ -222,10 +222,10 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
function formatPrompt(data:string){
if(!data.startsWith('@@@')){
data = "@@@system\n" + data
if(!data.startsWith('@@')){
data = "@@system\n" + data
}
const parts = data.split(/@@@(user|assistant|system)\n/);
const parts = data.split(/@@@?(user|assistant|system)\n/);
// Initialize empty array for the chat objects
const chatObjects: OpenAIChat[] = [];