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