[fix] continue
This commit is contained in:
@@ -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 = ''
|
||||
|
||||
@@ -46,8 +46,6 @@ export function stringlizeNAIChat(formated:OpenAIChat[], char:string, continued:
|
||||
}
|
||||
}
|
||||
|
||||
console.log(resultString)
|
||||
|
||||
let res = resultString.join(seperator)
|
||||
|
||||
if(!continued){
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'){
|
||||
|
||||
Reference in New Issue
Block a user