Giter Site home page Giter Site logo

characterai-dumper's Introduction

Deprecation Notice

The CharacterAI website has finally been updated to fix the wasteful serialization of conversation histories. Unfortunately, that change has broken this userscript.

Due to time constraints I am no longer maintaining this repository, and instead recommend that you look for other tools to export your CAI conversations. One such tool I've been suggested is a browser extension called "CAI Tools". I have not tested it myself and as such cannot vouch for it - but if you need a replacement for this userscript, I suggest searching for it and giving it a shot.

CharacterAI Dumper Userscript

This userscript allows you to download your saved messages with any bot you've ever talked to, given you can reach their chat history page. If you're a bot creator, it also allows you to separately download your bot's definitions.

How to use

  • Install a userscript manager.
    • Personally I tested this with Violentmonkey on Firefox, but I think Greasemonkey and Tampermonkey should work as well.
  • Install the userscript from here.
  • Now, while you're talking to a character, click on "View Saved Chats" to go to their histories page: Where to find "View Saved Chats"
  • After a few seconds, a Download link should pop up next to the "Your past conversations with so-and-so" header: What the download link looks like
  • Clicking on the link will download a .json file containing the bot's basic info (name, description, greeting) and all the interactions you've ever had with it.
  • If you're a bot creator, you can also head over into the Character Editor to download a bot's definitions: Where to find the definitions download

Other notes

  • If you've never used the "Save and Start New Chat" feature, you won't have the "View Saved Chats" option shown in the first screenshot.

  • The script attempts to anonymize the dumped data (it scrubs known sensitive fields and attempts to replace any instances of your name within messages), but if you're paranoid, you should open the downloaded JSON and search for your username/email/display name just to make sure.

Changelog

  • v1.4:
    • Fixed a bug where the Download link wouldn't show up for a given bot if you had a conversation with it where all of the messages were deleted.
  • v1.3:
    • Implemented support for downloading a character's definitions from the Character Editor page.
    • Fixed a bug where the Download link was not showing up on some bots that had trailing whitespace in their names (e.g. 2B ).
  • v1.2:
    • Fixed a bug where the user's display name was not being redacted inside messages.
  • v1.1:
    • File was renamed so userscript managers pick up that it's a userscript and offer to install automatically.
    • If you installed v1.0, you need to manually uninstall and re-install from the new link.
  • v1.0:
    • Initial release.

Troubleshooting

If the Download link doesn't show up after a few seconds and you're on the proper page, check the DevTools console for errors.

Usually, failures are caused by some browser extension or configuration that stops the userscript from loading its external dependencies properly. However, there are two other known failure modes that seem to be somewhat common:

  • Sometimes a character seems to have mismatched names depending on which API endpoint is being hit. In those cases, you'll need to manually download the response data instead of using the userscript, as described here.
  • For whatever reason, some people report certain combinations of browser/OS/userscript managers not working, but upon switching to another browser/userscript manager everything works fine. If the download link never shows up, consider trying another browser or userscript manager (or both).

characterai-dumper's People

Contributors

0x000011b avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

characterai-dumper's Issues

Any idea how one might export a room conversation?

I have a long chat that I started as a room rather than a one on one chat, even though there's only one bot in it. Wanted to test out rooms to see if there any differences, but because of that there is no option to view saved chats.

I tried changing the "chat" to "histories" in the url, but I just got an endless loading screen.

Help?

Incorrect characterIdentifier when dumping chat history

When I tried the script on a bot I have barely talked to, it worked fine. But when I tried it on a different bot that I've talked to more, it worked until chat histories, where characterIdentifier = my username instead of the bot's name, and then it gets stuck. The incorrect characterIdentifier seems to be the only problem, because if I edit the script to hardcode the characterIdentifier it works as normal.

Can’t find variable: s error on iOS

Hi, I’ve been trying to back up my chat data via mobile (iPad specifically), I’ve installed a bunch of plugins that I needed but now I keep getting a “can’t find variable: s” error every time I try. other times it just freezes at “got chat history” and won’t proceed from there, or at “configuring intercepts” it gives multiple script errors and eventually “null”
381C8BA1-99F4-4E53-AF30-A58112D61639
. I’m not exactly sure what I could be doing wrong or how to fix this, and I can’t figure out a way to change my password to access it on a PC so I’m kinda stuck at the moment

3A3B2E37-789C-44A5-91B0-F16B4670C6E6

Download link not appearing

I'm using Greasemonkey on Firefox 106.0.3. I go to the saved chats page, but the Download link doesn't appear. I know that the script is running though, because I see this in the console:

tmp r7jnDqoWpt

Download Link not Appearing on Long Chat

I started using beta.ai about a week ago, before all of the hypocritical stuff went on. I, like many people finding their way to this bit right here, want to save my personal character files for re-use in the alternatives. I like how my little story has gone so far and would like to continue it.

The issue: download link doesn't appear. I think the issue might be related to it being a 1900~ish word chat because I tried it with a far smaller chat of like 15 messages and the link came up almost immediately. Any help would be appreciated. I am using Tampermonkey 4.18.1 on Google Chrome. I am extremely new to all of this, so patience is appreciated.

Download button not showing up.

I don't know if I'm missing something but whenever I try to download a history to import the character to Pygmalion the download button does not show up. Yes, I did try your troubleshooting methods but they did not work. I thought it might have been a problem with the AI I was trying to download but it is also not showing up with AI I have previously downloaded. I do not know if this is because of a new CAI update or something on the end of Tampermonkey or if your script just stopped working. I have tried it with Violentmonkey on Google and on Firefox, but nothing has worked. Thank you for your time and effort in this script and I hope that this issue can be resolved easily, either through waiting or you fixing something.

I will attach an image of an error/hint that Tampermoneky detected. I know nothing about coding and whether it was intentional and not an error.
Screenshot_39
Screenshot_40

Download link not appearing on Your Past Conversations chat.

The download link is not being injected into the Chat Histories page. It worked a few days ago. It still appears on the Character Definition page.

I am on Opera GX 96.0.4693.127 using tampermonkey.

In the console, I can see lines like "[CharacterAI Dumper v1.4] Got character info for..." indicating the script is running. However, when I pick through the page source, there is no element for the Download link (assuming it's supposed to exist in the title area along with "Your Past Conversations with...").

Any way export only the messages?

Hi, I recently switched to KoboldAI. Well I wanted to export some of my previous messaging from characterAI with this, but uhh it didn't really let me. Any way to only export the messaging?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.