% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api_chat_completions.R
\name{chat_completions_chat}
\alias{chat_completions_chat}
\alias{chat_completions}
\title{Chat with any OpenAI-Compatible API Endpoint}
\usage{
chat_completions_chat(
  .llm,
  .api_url,
  .api_key_env_var = NULL,
  .model = "default",
  ...
)

chat_completions(..., .called_from = NULL)
}
\arguments{
\item{.llm}{An \code{LLMMessage} object containing the conversation history.}

\item{.api_url}{Base URL for the API endpoint (required).}

\item{.api_key_env_var}{Name of the environment variable holding the API key.}

\item{.model}{The model identifier to use (default: \code{"default"}).}

\item{...}{Additional parameters passed to the underlying chat function.}

\item{.called_from}{Internal routing argument; do not set manually.}
}
\value{
An updated \code{LLMMessage} object with the assistant's response appended.
}
\description{
Provider function for interacting with any server that implements the OpenAI
Chat Completions wire format (vLLM, LiteLLM, Together, Anyscale, etc.).
Supports the \code{chat()} verb only.
}
