| llama_memory_clear | R Documentation |
Removes all tokens from the KV cache. Call this before starting a new generation from scratch.
llama_memory_clear(ctx)
ctx |
Context handle returned by [llama_new_context] |
No return value, called for side effects.
## Not run:
# Clear the KV cache to start a fresh conversation
llama_memory_clear(ctx)
result <- llama_generate(ctx, "New topic: ", max_new_tokens = 50L)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.