% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/llama.R
\name{llama_memory_seq_rm}
\alias{llama_memory_seq_rm}
\title{Remove tokens from a sequence in the KV cache}
\usage{
llama_memory_seq_rm(ctx, seq_id, p0 = -1L, p1 = -1L)
}
\arguments{
\item{ctx}{Context handle returned by [llama_new_context]}

\item{seq_id}{Sequence ID (integer)}

\item{p0}{Start position (inclusive, -1 for beginning)}

\item{p1}{End position (exclusive, -1 for end)}
}
\value{
A logical scalar: \code{TRUE} if tokens were successfully removed.
}
\description{
Removes cached tokens for the given sequence in the position range [p0, p1).
Use p0 = -1 and p1 = -1 to remove all tokens for the sequence.
}
\examples{
\dontrun{
# Remove all tokens from sequence 0
llama_memory_seq_rm(ctx, seq_id = 0L, p0 = -1L, p1 = -1L)
}
}
