We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcfa394 commit 8e839b8Copy full SHA for 8e839b8
src/lib/server/sentenceSimilarity.ts
@@ -22,7 +22,7 @@ export async function findSimilarSentences(
22
const output = await embeddingEndpoint({ inputs });
23
24
const queryEmbedding: Embedding = output[0];
25
- const sentencesEmbeddings: Embedding[] = output.slice(1, inputs.length - 1);
+ const sentencesEmbeddings: Embedding[] = output.slice(1);
26
27
const distancesFromQuery: { distance: number; index: number }[] = [...sentencesEmbeddings].map(
28
(sentenceEmbedding: Embedding, index: number) => {
0 commit comments