Fix chunking/snippet logs for clarity (#4129)
update chunking/snippet logs for clarity
This commit is contained in:
parent
3b00020577
commit
1cd0cc32b8
@ -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;
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
@ -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 = [];
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
@ -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 = [];
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user