Exporting ChatGPT chats to SillyTavern
with character names and corrected timestamps - ideal for use with the Qdrant RAG Memory Extension
1. Install the exporter
- Add the Tampermonkey browser extension:
https://chromewebstore.google.com/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo - Install ChatGPT Exporter:
https://github.com/pionxzh/chatgpt-exporter - Go to Extensions > Manage Extensions, find Tampermonkey > Details, and enable “Allow user scripts.”
- Reload ChatGPT. You should now see an Export button at the bottom left of the page above your username.
2. To export:
- Open the conversation you want.
- Click Export > JSON > JSONL (TavernAI, SillyTavern). For this guide we’ll assume the file is saved as export.jsonl.
2. Fix timestamps and character names
This will add the name of the character and fix the dates, or else every chat imports as "January 1970" and the characters become "Assistant" and "User".
Alternative:
SillyTavern can rename the assistant internally. You can rename the character directly and it will offer to update all previous chats automatically. That fixes the names but not the dates.
If you prefer to do this and don't care about dates you can skip the whole python thing.
I highly recommend taking advantage of the date fix for memory storage though.
3. Install Python
Download and install from https://www.python.org/downloads/
4. Create the script
Open Python’s IDLE or any text editor, create a new file and paste the code below. Replace the names with yours (USER_NAME) and your AI's (AI_NAME), and the chat names (input and output files) if desired.
Save it as add_timestamps.py in the same folder as your exported chat.
Step-by-Step on Windows or macOS
- Create the file
Option A - Using IDLE (comes with Python):
Open IDLE from your start menu or applications folder.
Click File > New File.
Paste the Python code above into the blank window.
Click File > Save As…, name it add_timestamps.py, and save it in the same folder as your exported .json file (for example, Downloads).
Option B - Using a text editor:
Open a text editor such as Notepad, TextEdit, VS Code, or Sublime.
Paste the code.
Save it as add_timestamps.py (make sure the extension is .py, not .txt), in the same directory as your chat export.
- Place the export
Make sure your export file (e.g., export.json) is in that same folder.
If it has a different name, either rename it to export.json or edit the line in the script:INPUT_FILE = "your_filename.json"
Run the script
Windows:
Open the Start menu and type “cmd”, then press Enter.
Use cd to go to the folder where the files are, for example:
cd USERPROFILE\Downloads
Run:
python add_timestamps.py
macOS / Linux:
Open Terminal.
Use cd to navigate to the folder:
cd ~/Downloads
Run:
python3 add_timestamps.py
Check the result
When it finishes, you’ll see:
✅ send_date corrected, human-readable dates added, and names replaced.
That new file will appear in the same folder - now every message has a timestamp field that SillyTavern or Qdrant can read, and proper character names.
6. Import into SillyTavern
- Open SillyTavern and select your character.
- Click the three-line menu in the bottom left > Manage Chat Files > Import Chat.
- Choose your new file. (Version 1.13.5+ supports importing multiple chats at once.)
✨Done✨
Optional steps:
7. Batch process all exported chats
If you’ve exported many .jsonl chats and want to convert them all in one go, you can use this one-liner instead of editing each file manually.
Place this in the same folder as your add_timestamps.py script and all your .jsonl exports, then run it in the terminal.
Windows (PowerShell):
Get-ChildItem *.jsonl | ForEach-Object { python add_timestamps.py $_.Name }
macOS / Linux (bash / zsh):
for f in *.jsonl; do python3 add_timestamps.py "$f"; done
Each file will be processed in sequence, producing matching output files (for example, export_with_dates_<originalname>.jsonl if you prefer to use the script to rename automatically).
8. Auto-naming version of add_timestamps.py
This variant processes either a single file or, when used with the one-liner batch commands, automatically names each output file as filename_with_dates.jsonl.
Example workflow
macOS / Linux:
for f in *.jsonl; do python3 add_timestamps.py "$f"; done
Windows (PowerShell):
Get-ChildItem *.jsonl | ForEach-Object { python add_timestamps.py $_.Name }
You’ll end up with tidy pairs like:
chat1.jsonl > chat1_with_dates.jsonl
chat2.jsonl > chat2_with_dates.jsonl
Each output keeps the same formatting, adds readable timestamps, and replaces character names - fully ready for bulk import into SillyTavern.