I’m in search of Linux software, whether it’s command-line or GUI-based, that allows me to archive my ChatGPT conversations for later reference. Ideally, the software should allow me to organize these conversations by date for easy retrieval and offer a robust full-text search feature to quickly locate specific information within the chats. While any chat application permitting message posting, editing, and removal from both sender and receiver perspectives would suffice, I’d prefer the ability to store each different topic or day’s conversation within a single chat thread to maintain a neat and organized record of my interactions.

  • mo_ztt ✅@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago
    1. Settings & Beta -> Data controls -> Export data
    2. Unzip
    Python 3.11.3 (main, Apr 21 2023, 11:54:59) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import json
    >>> with open('conversations.json') as infile:
    ...     convos = json.load(infile)
    ... 
    >>> for convo in convos:
    ...     for key, value in convo['mapping'].items():
    ...         message = value.get("message", None)
    ...         if message:
    ...             parts = message.get("content", {}).get("parts", [])
    ...             for part in parts:
    ...                 if 'text to search' in part:
    ...                     print(part)
    
    1. Customize to taste
    • CoderSupreme@programming.devOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      10 months ago
      1. Settings & Beta -> Data controls -> Export data
      2. Unzip
      Python 3.11.3 (main, Apr 21 2023, 11:54:59) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import json
      >>> with open('conversations.json') as infile:
      ...     convos = json.load(infile)
      ... 
      >>> for convo in convos:
      ...     for key, value in convo['mapping'].items():
      ...         message = value.get("message", None)
      ...         if message:
      ...             parts = message.get("content", {}).get("parts", [])
      ...             for part in parts:
      ...                 if 'text to search' in part:
      ...                     print(part)
      
      1. Customize to taste

      Nice