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

\item{seq_id_src}{Source sequence ID}

\item{seq_id_dst}{Destination sequence ID}

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

\item{p1}{End position (exclusive, -1 for end)}
}
\value{
No return value, called for side effects.
}
\description{
Copies cached tokens from one sequence to another in the position range [p0, p1).
}
\examples{
\dontrun{
# Copy sequence 0 to sequence 1
llama_memory_seq_cp(ctx, seq_id_src = 0L, seq_id_dst = 1L,
                    p0 = -1L, p1 = -1L)
}
}
