#include
#include
#include
#include
#include <unistd.h>
using namespace std;
const string CHAT_HISTORY_FILE = "your-bot-model_chat_history.txt";
vector load_chat_history() {
ifstream f(CHAT_HISTORY_FILE);
vector chat_history;
string line;
while (getline(f, line)) {
chat_history.push_back(line);
}
return chat_history;
}
void save_chat_history(const vector& chat_history) {
ofstream f(CHAT_HISTORY_FILE);
for (const string& line : chat_history) {
f << line << endl;
}… See the full description on the dataset page:
https://huggingface.co/datasets/smalleyes/Bot-memory.