Fix chunking/snippet logs for clarity (#4129)

update chunking/snippet logs for clarity
This commit is contained in:
Sean Hatfield 2025-07-11 10:54:54 -07:00 committed by GitHub
parent 3b00020577
commit 1cd0cc32b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 10 additions and 10 deletions

View File

@ -165,7 +165,7 @@ class NativeEmbedder {
data = JSON.stringify(output.tolist()); data = JSON.stringify(output.tolist());
await this.#writeToTempfile(tmpFilePath, data); await this.#writeToTempfile(tmpFilePath, data);
this.log(`Embedded Chunk ${idx + 1} of ${chunkLen}`); this.log(`Embedded Chunk Group ${idx + 1} of ${chunkLen}`);
if (chunkLen - 1 !== idx) await this.#writeToTempfile(tmpFilePath, ","); if (chunkLen - 1 !== idx) await this.#writeToTempfile(tmpFilePath, ",");
if (chunkLen - 1 === idx) await this.#writeToTempfile(tmpFilePath, "]"); if (chunkLen - 1 === idx) await this.#writeToTempfile(tmpFilePath, "]");
pipeline = null; pipeline = null;

View File

@ -209,7 +209,7 @@ const AstraDB = {
}); });
const textChunks = await textSplitter.splitText(pageContent); const textChunks = await textSplitter.splitText(pageContent);
console.log("Chunks created from document:", textChunks.length); console.log("Snippets created from document:", textChunks.length);
const documentVectors = []; const documentVectors = [];
const vectors = []; const vectors = [];
const vectorValues = await EmbedderEngine.embedChunks(textChunks); const vectorValues = await EmbedderEngine.embedChunks(textChunks);

View File

@ -255,7 +255,7 @@ const Chroma = {
}); });
const textChunks = await textSplitter.splitText(pageContent); const textChunks = await textSplitter.splitText(pageContent);
console.log("Chunks created from document:", textChunks.length); console.log("Snippets created from document:", textChunks.length);
const documentVectors = []; const documentVectors = [];
const vectors = []; const vectors = [];
const vectorValues = await EmbedderEngine.embedChunks(textChunks); const vectorValues = await EmbedderEngine.embedChunks(textChunks);

View File

@ -331,7 +331,7 @@ const LanceDb = {
}); });
const textChunks = await textSplitter.splitText(pageContent); const textChunks = await textSplitter.splitText(pageContent);
console.log("Chunks created from document:", textChunks.length); console.log("Snippets created from document:", textChunks.length);
const documentVectors = []; const documentVectors = [];
const vectors = []; const vectors = [];
const submissions = []; const submissions = [];

View File

@ -207,7 +207,7 @@ const Milvus = {
}); });
const textChunks = await textSplitter.splitText(pageContent); const textChunks = await textSplitter.splitText(pageContent);
console.log("Chunks created from document:", textChunks.length); console.log("Snippets created from document:", textChunks.length);
const documentVectors = []; const documentVectors = [];
const vectors = []; const vectors = [];
const vectorValues = await EmbedderEngine.embedChunks(textChunks); const vectorValues = await EmbedderEngine.embedChunks(textChunks);

View File

@ -539,7 +539,7 @@ const PGVector = {
}); });
const textChunks = await textSplitter.splitText(pageContent); const textChunks = await textSplitter.splitText(pageContent);
this.log("Chunks created from document:", textChunks.length); this.log("Snippets created from document:", textChunks.length);
const documentVectors = []; const documentVectors = [];
const vectors = []; const vectors = [];
const submissions = []; const submissions = [];

View File

@ -153,7 +153,7 @@ const PineconeDB = {
}); });
const textChunks = await textSplitter.splitText(pageContent); const textChunks = await textSplitter.splitText(pageContent);
console.log("Chunks created from document:", textChunks.length); console.log("Snippets created from document:", textChunks.length);
const documentVectors = []; const documentVectors = [];
const vectors = []; const vectors = [];
const vectorValues = await EmbedderEngine.embedChunks(textChunks); const vectorValues = await EmbedderEngine.embedChunks(textChunks);

View File

@ -225,7 +225,7 @@ const QDrant = {
}); });
const textChunks = await textSplitter.splitText(pageContent); const textChunks = await textSplitter.splitText(pageContent);
console.log("Chunks created from document:", textChunks.length); console.log("Snippets created from document:", textChunks.length);
const documentVectors = []; const documentVectors = [];
const vectors = []; const vectors = [];
const vectorValues = await EmbedderEngine.embedChunks(textChunks); const vectorValues = await EmbedderEngine.embedChunks(textChunks);

View File

@ -266,7 +266,7 @@ const Weaviate = {
}); });
const textChunks = await textSplitter.splitText(pageContent); const textChunks = await textSplitter.splitText(pageContent);
console.log("Chunks created from document:", textChunks.length); console.log("Snippets created from document:", textChunks.length);
const documentVectors = []; const documentVectors = [];
const vectors = []; const vectors = [];
const vectorValues = await EmbedderEngine.embedChunks(textChunks); const vectorValues = await EmbedderEngine.embedChunks(textChunks);

View File

@ -200,7 +200,7 @@ const Zilliz = {
}); });
const textChunks = await textSplitter.splitText(pageContent); const textChunks = await textSplitter.splitText(pageContent);
console.log("Chunks created from document:", textChunks.length); console.log("Snippets created from document:", textChunks.length);
const documentVectors = []; const documentVectors = [];
const vectors = []; const vectors = [];
const vectorValues = await EmbedderEngine.embedChunks(textChunks); const vectorValues = await EmbedderEngine.embedChunks(textChunks);