Risuai 0.6.3 first commit

This commit is contained in:
kwaroran
2023-05-07 12:41:45 +09:00
parent 50e5e1d917
commit 2c5c7d2694
98 changed files with 15070 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import type { OpenAIChat } from ".";
export function multiChatReplacer(){
}
export function stringlizeChat(formated:OpenAIChat[], char:string = ''){
let resultString:string[] = []
for(const form of formated){
if(form.role === 'system'){
resultString.push("'System Note: " + form.content)
}
else if(form.role === 'user'){
resultString.push("User: " + form.content)
}
else if(form.role === 'assistant'){
resultString.push("Assistant: " + form.content)
}
}
return resultString.join('\n\n') + `\n\n${char}:`
}