Unified LLM chat interface for agrillm

llm_chat(
  prompt,
  use_cache = FALSE,
  persist_cache = TRUE,
  cache_path = NULL,
  ...
)

Arguments

prompt

The prompt or message to send to the LLM.

use_cache

Logical. If TRUE, reuse cached backend responses for identical requests within the current R session. Default: FALSE.

persist_cache

Logical. If TRUE, persist cached responses to disk so they can be reloaded in later sessions. Default: TRUE.

cache_path

Optional character string path to the cache file used when persist_cache = TRUE. Default: .cache_agrillm.rds in the current working directory.

...

Additional arguments passed to the backend chat function.

Value

The response from the LLM backend.