Skip to contents

This function removes a chatlog from the package's private chat environment, so the conversation is gone. To keep the system message and start over, use clear_chatlog() instead.

Usage

delete_chatlog(chatlog_id)

Arguments

chatlog_id

The id of a stored chatlog, or a chatlog object. There is no default: give ".__CURRENTCHAT__" to delete the conversation of chat().

Value

The deleted chatlog, invisibly.

Errors

An id under which no chatlog is stored raises an openair_chatlog_not_found error, as in get_chatlog().

Examples

start_chat(chatlog_id = "demo")
#> Chatlog ID: demo
#>     role                      content
#> 1 system You are a helpful assistant.
delete_chatlog("demo")
"demo" %in% list_chatlogs()
#> [1] FALSE