[fix] first message not working
This commit is contained in:
@@ -169,15 +169,19 @@ export async function sendChat(chatProcessIndex = -1):Promise<boolean> {
|
|||||||
content: '[Start a new chat]'
|
content: '[Start a new chat]'
|
||||||
})
|
})
|
||||||
|
|
||||||
chats.push({
|
if(nowChatroom.type !== 'group'){
|
||||||
role: 'assistant',
|
const firstMsg = nowChatroom.firstMsgIndex === -1 ? nowChatroom.firstMessage : nowChatroom.alternateGreetings[nowChatroom.firstMsgIndex]
|
||||||
content: processScript(currentChar,
|
|
||||||
replacePlaceholders(nowChatroom.firstMessage, currentChar.name),
|
chats.push({
|
||||||
'editprocess')
|
role: 'assistant',
|
||||||
})
|
content: processScript(currentChar,
|
||||||
currentTokens += await tokenize(processScript(currentChar,
|
replacePlaceholders(firstMsg, currentChar.name),
|
||||||
replacePlaceholders(nowChatroom.firstMessage, currentChar.name),
|
'editprocess')
|
||||||
'editprocess'))
|
})
|
||||||
|
currentTokens += await tokenize(processScript(currentChar,
|
||||||
|
replacePlaceholders(firstMsg, currentChar.name),
|
||||||
|
'editprocess'))
|
||||||
|
}
|
||||||
|
|
||||||
const ms = currentChat.message
|
const ms = currentChat.message
|
||||||
for(const msg of ms){
|
for(const msg of ms){
|
||||||
|
|||||||
Reference in New Issue
Block a user