Skip to content

Commit c5bf16d

Browse files
committed
fix: use targetChunkSize for chunk move distance in chunkByCharacters
1 parent 7c91768 commit c5bf16d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/android/locanara/src/main/kotlin/com/locanara/rag/DocumentChunker.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ class DocumentChunker(
218218
}
219219

220220
// Move forward with overlap
221-
val moveDistance = maxOf(1, chunkSize - config.chunkOverlap)
221+
val moveDistance = maxOf(1, config.targetChunkSize - config.chunkOverlap)
222222
currentIndex += moveDistance
223223
}
224224

0 commit comments

Comments
 (0)