| load_chat_session | R Documentation |
Load a previously saved ChatSession from a file.
load_chat_session(path, tools = NULL, hooks = NULL, registry = NULL)
path |
File path to load from (.rds or .json). |
tools |
Optional list of Tool objects (tools are not saved, must be re-provided). |
hooks |
Optional HookHandler object. |
registry |
Optional ProviderRegistry. |
A ChatSession object with restored state.
if (interactive()) {
# Load a saved session
chat <- load_chat_session("my_session.rds", tools = my_tools)
# Continue where you left off
response <- chat$send("Let's continue our discussion")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.