Skip to content

Commit e256c62

Browse files
authored
Update LocalVectorStore.kt (#194)
Fix name collision
1 parent d125f98 commit e256c62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/commonMain/kotlin/com/xebia/functional/xef/vectorstores/LocalVectorStore.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private constructor(private val embeddings: Embeddings, private val state: Atomi
5454
return state0.documents
5555
.asSequence()
5656
.mapNotNull { doc -> state0.precomputedEmbeddings[doc]?.let { doc to it } }
57-
.map { (doc, embedding) -> doc to embedding.cosineSimilarity(embedding) }
57+
.map { (doc, e) -> doc to embedding.cosineSimilarity(e) }
5858
.sortedByDescending { (_, similarity) -> similarity }
5959
.take(limit)
6060
.map { (document, _) -> document }

0 commit comments

Comments
 (0)