Decrease batch size. Add browser console log

This commit is contained in:
Cohee 2023-09-09 15:12:54 +03:00
parent da34517943
commit 4d08e3e9be
1 changed files with 5 additions and 3 deletions

View File

@ -59,7 +59,7 @@ async function onVectorizeAllClick() {
}
}
async function synchronizeChat(batchSize = 10) {
async function synchronizeChat(batchSize = 5) {
try {
if (!settings.enabled) {
return -1;
@ -181,8 +181,10 @@ async function rearrangeChat(chat) {
}
// Format queried messages into a single string
const queriedText = 'Past events: ' + queriedMessages.map(x => collapseNewlines(`${x.name}: ${x.mes}`).trim()).join('\n\n');
setExtensionPrompt(EXTENSION_PROMPT_TAG, queriedText, extension_prompt_types.IN_PROMPT, 0);
const queriedText = queriedMessages.map(x => collapseNewlines(`${x.name}: ${x.mes}`).trim()).join('\n\n');
console.log('Vectors: relevant past messages found.\n', queriedText);
const insertedText = `Past events: ${queriedText}`;
setExtensionPrompt(EXTENSION_PROMPT_TAG, insertedText, extension_prompt_types.IN_PROMPT, 0);
} catch (error) {
console.error('Vectors: Failed to rearrange chat', error);
}