This function converts an LLMMessage to the turns ellmer chat object.
The ellmer object is cloned and its turn history is cleared internatlly.
This maintains tidyllms stateless style.
chat_ellmer(
.llm,
.ellmer_chat,
.stream = FALSE,
.timeout = 60,
.verbose = FALSE,
.dry_run = FALSE,
.tools = NULL,
.max_tries = 3
)A new LLMMessage object containing the original messages plus the assistant's response.
An LLMMessage object containing the conversation history.
An ellmer chat object (e.g., from ellmer::chat_anthropic()).
Logical; if TRUE, streams the response piece by piece (default: FALSE).
Request timeout in seconds (default: 60).
If TRUE, displays additional information about the chat (default: FALSE).
If TRUE, returns the constructed request object without executing it (default: FALSE).
Dummy for error message if called from chat with tools (default: NULL).
Maximum retries to perform the request (default: 3).