% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chatRater.R
\name{generate_ratings_for_all}
\alias{generate_ratings_for_all}
\title{Batch Rating Generator}
\usage{
generate_ratings_for_all(model = NULL, stim_list, ...)
}
\arguments{
\item{model}{LLM model name (default varies by provider)}

\item{stim_list}{A character vector of stimuli to process. Each element can be
a text string, a local file path (image/audio), or an image URL.}

\item{...}{Additional arguments passed to [generate_ratings()]}
}
\description{
Process multiple stimuli in sequence using 'LLMs'.
  Supports text, image, and audio stimuli (see [generate_ratings()]).
}
\examples{
\dontrun{
# ---------------------------------------------------------------
# 1. BATCH TEXT — rate multiple idioms for familiarity
# ---------------------------------------------------------------
idioms <- c("kick the bucket", "spill the beans", "break a leg",
            "hit the nail on the head", "once in a blue moon")
results <- generate_ratings_for_all(
  stim_list = idioms,
  prompt    = "You are a native English speaker.",
  question  = "Rate how familiar this expression is (1 = unfamiliar, 7 = very familiar):",
  scale     = "1-7",
  provider  = "ollama",
  columns   = c("stim", "rating")
)
results

# ---------------------------------------------------------------
# 2. BATCH TEXT — get full descriptions
# ---------------------------------------------------------------
results <- generate_ratings_for_all(
  stim_list   = c("kick the bucket", "spill the beans"),
  prompt      = "You are an expert linguist.",
  question    = "Explain the meaning of this idiom in one sentence:",
  provider    = "openai",
  api_key     = Sys.getenv("OPENAI_API_KEY"),
  return_type = "text",
  columns     = c("stim", "rating")
)

# ---------------------------------------------------------------
# 3. BATCH IMAGE — mix of local files and URLs
# ---------------------------------------------------------------
stimuli <- c(
  "/path/to/image1.png",                         # local file
  "/path/to/image2.jpg",                         # local file
  "https://osf.io/download/example_img.png"      # URL
)
results <- generate_ratings_for_all(
  stim_list = stimuli,
  prompt    = "You are an expert in visual perception.",
  question  = "Rate the visual complexity (1 = simple, 5 = complex):",
  scale     = "1-5",
  provider  = "openai",
  api_key   = Sys.getenv("OPENAI_API_KEY"),
  columns   = c("stim", "rating", "type")
)

# ---------------------------------------------------------------
# 4. BATCH AUDIO — rate fluency of multiple speech recordings
# ---------------------------------------------------------------
audio_files <- c(
  "/path/to/speaker1.wav",
  "/path/to/speaker2.mp3",
  "/path/to/speaker3.m4a"
)
results <- generate_ratings_for_all(
  stim_list = audio_files,
  prompt    = "You are an expert language teacher.",
  question  = "Rate the overall fluency of the speaker (1 = very disfluent, 7 = very fluent):",
  scale     = "1-7",
  provider  = "openai",
  api_key   = Sys.getenv("OPENAI_API_KEY"),
  columns   = c("stim", "rating")
)
}
}
