% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/help_functions.R
\name{ask_groq}
\alias{ask_groq}
\title{Send Prompt to GROQ AI API}
\usage{
ask_groq(prompt, temp, topp = 1, model, api_key)
}
\arguments{
\item{prompt}{Character. The text prompt to send to the AI model.}

\item{temp}{Numeric. Temperature parameter controlling randomness (0-1).
Lower values make output more deterministic. Required (typically from set_api_specs()).}

\item{topp}{Numeric. Top-p parameter controlling diversity (0-1). Default is 1.}

\item{model}{Character. GROQ model to use. Required (typically from set_api_specs()).}

\item{api_key}{Character. GROQ API key. Must be provided.}
}
\value{
Character. The AI model's response to the prompt, or NA if an error occurs.
}
\description{
This function sends a text prompt to the GROQ AI API and returns the model's
response. It includes error handling and uses the groqR package for API communication.
}
\details{
The function uses the groqR package to communicate with GROQ's API. It includes
error handling that returns NA if the API call fails. The function is optimized
for text processing tasks with a maximum token limit of 5000.
}
\examples{
\dontrun{
# Set API key first
Sys.setenv(GROQ_API_KEY = "your_api_key")

# Send a simple prompt
response <- ask_groq("What is the capital of France?")

# Use different parameters
response <- ask_groq("Analyze this text", temp = 0.3, topp = 0.9)
}

}
\seealso{
\code{\link[=ask_openai]{ask_openai()}}
}
