% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/content-replay.R
\name{contents_record}
\alias{contents_record}
\alias{contents_replay}
\title{Record and replay content}
\usage{
contents_record(x)

contents_replay(x, tools = list(), .envir = parent.frame())
}
\arguments{
\item{x}{A \link{Turn} or \link{Content} object to serialize; or a serialized object
to replay.}

\item{tools}{A named list of tools}

\item{.envir}{The environment in which to look for class definitions. Used
when the recorded objects include classes that extend \link{Turn} or
\link{Content} but are not from the \pkg{ellmer} package itself.}
}
\description{
These generic functions can be use to convert \link{Turn}, \link{Content}, and
\link{Source} objects
into easily serializable representations (i.e. lists and atomic vectors).
\itemize{
\item \code{contents_record()} accepts a \link{Turn} or \link{Content} and return a simple list.
\item \code{contents_replay()} takes the output of \code{contents_record()} and returns
a \link{Turn} or \link{Content} object.
}
}
\keyword{internal}
