% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{call_openai_chat}
\alias{call_openai_chat}
\title{Call OpenAI Chat Completion API}
\usage{
call_openai_chat(
  system_prompt,
  user_prompt,
  model = "gpt-4.1-mini",
  temperature = 0,
  max_tokens = 150,
  api_key
)
}
\arguments{
\item{system_prompt}{Character string with system instructions}

\item{user_prompt}{Character string with user message}

\item{model}{Character string specifying the model (default: "gpt-4.1-mini")}

\item{temperature}{Numeric temperature for response randomness (default: 0)}

\item{max_tokens}{Maximum number of tokens to generate (default: 150)}

\item{api_key}{Character string with OpenAI API key}
}
\value{
Character string with the model's response
}
\description{
Makes a chat completion request to OpenAI's API.
}
\concept{ai}
\keyword{internal}
