% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shield_ollama.R
\name{shield_ollama}
\alias{shield_ollama}
\title{Guard an Ollama chat workflow}
\usage{
shield_ollama(
  prompt,
  policy = "enterprise_default",
  checks = "both",
  model = NULL,
  context = NULL,
  redaction = NULL,
  scanners = scanner_options(),
  show_tokens = FALSE
)
}
\arguments{
\item{prompt}{User prompt.}

\item{policy}{A \code{shieldr_policy} or built-in policy name such as \code{"comprehensive"}.}

\item{checks}{One of \code{"rules"}, \code{"nlp"}, \code{"llm"}, or \code{"both"}.}

\item{model}{Ollama model name. When \code{NULL}, the first available model from
\code{ellmer::models_ollama()$id} is used.}

\item{context}{Optional data frame of retrieved context.}

\item{redaction}{Optional redaction strategy from \code{\link[=redaction_strategy]{redaction_strategy()}}.}

\item{scanners}{Optional scanner configuration from \code{\link[=scanner_options]{scanner_options()}}.}

\item{show_tokens}{Whether to attach token counts when \code{ellmer} is available.}
}
\value{
A \code{shieldr_result}.
}
\description{
Convenience wrapper that creates separate \code{ellmer} Ollama chats for the
assistant and semantic reviewer, then delegates to \code{\link[=secure_chat]{secure_chat()}}.
}
\details{
This is an optional local-model path. It requires the suggested \code{ellmer}
package and a running Ollama installation. Two chats are created:
one for the assistant response and one for reviewer checks. Keeping them
separate avoids mixing safety-review instructions into the assistant's
conversation state.

For an existing chat object, use \code{\link[=secure_chat]{secure_chat()}} directly.
}
\examples{
\dontrun{
shield_ollama("Summarise this safely.")
}
}
