Skip to content

Commit 3bfedda

Browse files
committed
Fixed Remove comment
1 parent 9e59105 commit 3bfedda

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

LLama/Batched/Conversation.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ public void Remove(LLamaPos start, LLamaPos end)
410410
}
411411

412412
/// <summary>
413-
/// Removes all tokens starting from the given position
413+
/// Removes <see cref="count"/> tokens starting from <see cref="start"/>
414414
/// </summary>
415415
/// <param name="start">Start position (inclusive)</param>
416416
/// <param name="count">Number of tokens</param>
@@ -419,7 +419,8 @@ public void Remove(LLamaPos start, int count)
419419
if (count <= 0)
420420
return;
421421

422-
_conversation.Executor.Context.NativeHandle.KvCacheRemove(_conversation.ConversationId, start, -1);
422+
var end = start.Value + count;
423+
_conversation.Executor.Context.NativeHandle.KvCacheRemove(_conversation.ConversationId, start, end);
423424
}
424425
#endregion
425426

0 commit comments

Comments
 (0)