Skip to contents

Returns a suggested adjustment as data the user may choose to apply. It never mutates the score or auto-applies changes, preserving reproducibility. Any malformed model response falls back to an empty (no-op) suggestion rather than flowing unchecked into the deterministic parameters.

Usage

syn_suggest(
  score,
  target = c("palette", "tempo"),
  model = .DEFAULT_LLM_MODEL,
  ...,
  call = rlang::caller_env()
)

Arguments

score

A prosody_score.

target

One of "palette" or "tempo".

model

Model name. Default "mistral-small".

...

Passed to the underlying ellmer chat call.

call

The calling environment, for error reporting. Experts only.

Value

A list with target, suggestion (advisory text or NA), and applied = FALSE. Requires ellmer + a reachable backend.

Examples

if (FALSE) { # \dontrun{
# Not run: needs the ellmer package and a running local Ollama server
# with the model available.
score <- syn_score(syn_read_text(syn_example_text("en"), lang = "en"))
syn_suggest(score, target = "tempo")
} # }