fix: messages from tool shouldn't use conversation choice

closes #173
This commit is contained in:
Pionxzh
2023-11-07 22:35:18 +08:00
parent aea00d2109
commit aff5ce18fe

View File

@@ -396,7 +396,7 @@ export function processConversation(conversation: ApiConversationWithId, convers
choice = conversationChoices[index] ?? _last
}
// Conversation choices will only applied to nodes with message
else if ('message' in node && node.message?.recipient === 'all') {
else if ('message' in node && node.message?.recipient === 'all' && node.message.author.role !== 'tool') {
index++
choice = conversationChoices[index] ?? _last
}