pionxzh / chatgpt-exporter

Export and Share your ChatGPT conversation history
MIT License
1.29k stars 100 forks source link

Help on creating exporter for chat.nbox.ai and other service #172

Closed tukangcode closed 1 year ago

tukangcode commented 1 year ago

Hello ! I want know if that possible you can help on supporting or help me create fork version of your exporter that support this site : https://chat.nbox.ai/ this site offer various open source module such as Mythalion and Lllma, but not support export option.

I try analysis your greasy fork code with chatgpt or claude but it imposible since it very long. i try look and analysis extension but i still not understand to how your code work, so i got question

  1. How code work
  2. how to detect form and export it code ?
  3. are there external api require ?

that all my question, thanks for help.

pionxzh commented 1 year ago

Hi, I have quickly taken a look at nbox ai, but unfortunately, our script couldn't support it.

  1. You can read the source code in this repo, it's quite straightforward.
  2. Not sure which form you were referring.
  3. Yes, we are relying on the ChatGPT API.

Here is how the code works:

  1. Mount the element to the appropriate position
  2. When an "export" is being triggered, we fetch the whole conversation raw data from the chatgpt API.
  3. Build up the relationship between conversation nodes into a tree-like data structure.
  4. Build up the final result or text content based on the format (text, md, HTML)

It would be troublesome to modify this script to support nbox, but maybe you can try to read the code of V1 of this plugin (https://github.com/pionxzh/chatgpt-exporter/tree/e1790b6cfceb95f0b331f223322bb128fbc3451f). It is totally based on DOM parsing so you don't need to rewrite the whole API thing.

tukangcode commented 1 year ago

thanks lot for help, i will look into it.

pionxzh commented 1 year ago

Here is the PR of V2 https://github.com/pionxzh/chatgpt-exporter/pull/64 And the issue of supporting other third-party chatgpt https://github.com/pionxzh/chatgpt-exporter/issues/143