% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api_ellmer.R
\name{chat_ellmer}
\alias{chat_ellmer}
\title{Send LLM Messages to Ellmer Chat Object}
\usage{
chat_ellmer(
  .llm,
  .ellmer_chat,
  .stream = FALSE,
  .timeout = 60,
  .verbose = FALSE,
  .dry_run = FALSE,
  .tools = NULL,
  .max_tries = 3
)
}
\arguments{
\item{.llm}{An \code{LLMMessage} object containing the conversation history.}

\item{.ellmer_chat}{An ellmer chat object (e.g., from \code{ellmer::chat_anthropic()}).}

\item{.stream}{Logical; if TRUE, streams the response piece by piece (default: FALSE).}

\item{.timeout}{Request timeout in seconds (default: 60).}

\item{.verbose}{If TRUE, displays additional information about the chat (default: FALSE).}

\item{.dry_run}{If TRUE, returns the constructed request object without executing it (default: FALSE).}

\item{.tools}{Dummy for error message if called from chat with tools (default: NULL).}

\item{.max_tries}{Maximum retries to perform the request (default: 3).}
}
\value{
A new \code{LLMMessage} object containing the original messages plus the assistant's response.
}
\description{
This function converts an \code{LLMMessage} to the turns ellmer chat object.
The ellmer object is cloned and its turn history is cleared internatlly.
This maintains tidyllms stateless style.
}
