% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/task.R
\name{task}
\alias{task}
\title{Define an annotation task (deprecated)}
\usage{
task(name, system_prompt, type_def, input_type = c("text", "image"))
}
\arguments{
\item{name}{Name of the codebook (character).}

\item{input_type}{Type of input data: \code{"text"} (default) or \code{"image"}.}
}
\value{
A task object (a list with class \code{"task"}) containing the task
definition.
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}
}
\details{
\code{task()} has been deprecated in favor of \code{\link[=qlm_codebook]{qlm_codebook()}}. The new function
returns an object with dual class inheritance that works with both the old
and new APIs.
}
\examples{
\dontrun{
# Deprecated usage
my_task <- task(
  name = "Sentiment",
  system_prompt = "Rate the sentiment from -1 (negative) to 1 (positive).",
  type_def = type_object(
    score = type_number("Sentiment score from -1 to 1"),
    explanation = type_string("Brief explanation")
  )
)

# New recommended usage
my_codebook <- qlm_codebook(
  name = "Sentiment",
  instructions = "Rate the sentiment from -1 (negative) to 1 (positive).",
  schema = type_object(
    score = type_number("Sentiment score from -1 to 1"),
    explanation = type_string("Brief explanation")
  )
)
}

}
\seealso{
\code{\link[=qlm_codebook]{qlm_codebook()}} for the replacement function.
}
\keyword{internal}
