跳到正文
DEV Community· Small Tools Lab·· 2 小時前AI 評分57

如何在本機匯出 ChatGPT、Claude 和 Gemini 對話

How I export ChatGPT, Claude and Gemini chats locally

AI 導讀

作者整理了在本機保存 ChatGPT、Claude 和 Gemini 對話的方法,涵蓋平台資料匯出及複製成 Markdown。

正文

Small Tools Lab

i keep good stuff in ai chats (code, prompts, notes) and kept losing it. here's what actually works for getting chats out, without sending them to some third party service.

1. built-in export options

ChatGPT: Settings > Data controls > Export data. it emails you a download link to a zip with chat.html and conversations.json. the html file opens in any browser and is searchable with ctrl+f. the json is every chat in one big file, fine for scripts, not fun to read. the link expires, so download it soon.

Claude: Settings > Privacy > Export data. same idea, you get an emailed link to a zip with your conversations as json.

Gemini: no one-click full export in the app that i know of. use Google Takeout (takeout.google.com), pick the Gemini / "My Activity" data. for single answers there is a share/export to Docs option under the response menu.

2. copy to markdown tips

  • for one chat, use the copy button on each reply. it copies markdown, so code blocks keep their fences.
  • select the whole conversation and paste into a markdown editor (obsidian, vscode). pasting often keeps formatting better than pasting into plain text.
  • add a header yourself: date, model, and a one line topic. future you will thank you.
  • for the json export, a tiny script that loops conversations and writes one .md file per chat is about 20 lines in python or node.

3. what breaks

  • the exports are all-or-nothing, so getting just 3 chats means digging through everything.
  • long chats can paste with weird line breaks, and tables sometimes turn into plain text.
  • images and attachments usually dont come along in the copied text.
  • the emailed links expire and exports can take a while to arrive.
  • formats change over time, so old scripts can break.

how do you save your chats now? copy paste, screenshots, something else? curious what works for people.

I'm building a small local-only extension for this (I built it): https://vo-waitlist.pages.dev/extension/?src=devto2

來源:DEV Community · dev.to