Clears cached LLM responses. You can optionally restrict removal to a single prompt and/or provider. A full clear also removes the default .cache_agrillm directory in the current working directory.

llm_cache_clear(message = NULL, provider = NULL)

Arguments

message

Optional character string. If provided, only matching cache entries are removed.

provider

Optional character string. If provided, only cache entries for that backend are removed.

Value

Invisibly returns the number of removed cache entries.