ch_history: Displays and sets the current session' chat history

View source: R/ch-history.R

ch_historyR Documentation

Displays and sets the current session' chat history

Description

Displays and sets the current session' chat history

Usage

ch_history(x = NULL)

Arguments

x

An list object that contains chat history. Use this argument to override the current history.

Value

A list object with the current chat history

Examples

library(chattr)

chattr_use("test", stream = FALSE)

chattr("hello")

# View history
ch_history()

# Save history to a file
chat_file <- tempfile()
saveRDS(ch_history(), chat_file)

# Reset history
ch_history(list())

# Re-load history
ch_history(readRDS(chat_file))


chattr documentation built on June 8, 2025, 11:07 a.m.