[feat] new chat settings in japanese
This commit is contained in:
@@ -26,7 +26,8 @@ export function exampleMessage(char:character, userName:string):OpenAIChat[]{
|
||||
add()
|
||||
result.push({
|
||||
role: "system",
|
||||
content: '[Start a new chat]'
|
||||
content: '[Start a new chat]',
|
||||
memo: "NewChatExample"
|
||||
})
|
||||
currentMessage = null
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
||||
formated[i].content = formated[i].name + ": " + formated[i].content
|
||||
}
|
||||
formated[i].name = undefined
|
||||
delete formated[i].memo
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,10 @@ export function unstringlizeChat(text:string, formated:OpenAIChat[], char:string
|
||||
export function stringlizeAINChat(formated:OpenAIChat[], char:string = ''){
|
||||
let resultString:string[] = []
|
||||
for(const form of formated){
|
||||
if(form.memo.startsWith("newChat")){
|
||||
resultString.push("[新しいチャットの始まり]")
|
||||
continue
|
||||
}
|
||||
if(form.role === 'system'){
|
||||
resultString.push(form.content)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user