[fix] continue

This commit is contained in:
kwaroran
2023-09-09 07:48:34 +09:00
parent 78b963625c
commit a9564189c4
4 changed files with 11 additions and 10 deletions

View File

@@ -391,12 +391,14 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
let chats:OpenAIChat[] = examples
chats.push({
role: 'system',
content: '[Start a new chat]',
memo: "NewChat"
})
console.log(db.aiModel)
if(!db.aiModel.startsWith('novelai')){
chats.push({
role: 'system',
content: '[Start a new chat]',
memo: "NewChat"
})
}
if(nowChatroom.type !== 'group'){
const firstMsg = nowChatroom.firstMsgIndex === -1 ? nowChatroom.firstMessage : nowChatroom.alternateGreetings[nowChatroom.firstMsgIndex]
@@ -702,7 +704,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
currentChar: currentChar,
useStreaming: true,
isGroupChat: nowChatroom.type === 'group',
bias: {}
bias: {},
}, 'model', abortSignal)
let result = ''

View File

@@ -46,8 +46,6 @@ export function stringlizeNAIChat(formated:OpenAIChat[], char:string, continued:
}
}
console.log(resultString)
let res = resultString.join(seperator)
if(!continued){

View File

@@ -360,6 +360,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
}
case 'novelai':
case 'novelai_kayra':{
console.log(arg.continue)
const proompt = stringlizeNAIChat(formated, currentChar?.name ?? '', arg.continue)
let logit_bias_exp:{
sequence: number[], bias: number, ensure_sequence_finish: false, generate_once: true

View File

@@ -22,7 +22,7 @@ export async function setRecommended(model: string, ask:'ask'|'force') {
setDatabase(setPreset(db, pr))
}
else if(db.aiModel.startsWith('novelai')){
const pr:botPreset = prebuiltPresets.NAI
const pr:botPreset = prebuiltPresets.NAI2
setDatabase(setPreset(db, pr))
}
else if(db.aiModel === 'textgen_webui' || db.aiModel === 'mancer'){