Fix manual vectorization of files
This commit is contained in:
parent
19ea1ee56c
commit
a3f6ce52e4
|
@ -893,6 +893,13 @@ async function onVectorizeAllFilesClick() {
|
||||||
for (const file of allFiles) {
|
for (const file of allFiles) {
|
||||||
const text = await getFileAttachment(file.url);
|
const text = await getFileAttachment(file.url);
|
||||||
const collectionId = getFileCollectionId(file.url);
|
const collectionId = getFileCollectionId(file.url);
|
||||||
|
const hashes = await getSavedHashes(collectionId);
|
||||||
|
|
||||||
|
if (hashes.length) {
|
||||||
|
console.log(`Vectors: File ${file.name} is already vectorized`);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
await vectorizeFile(text, file.name, collectionId, settings.chunk_size);
|
await vectorizeFile(text, file.name, collectionId, settings.chunk_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue