MemChatGPT-Extension

Thomas Pernet
5 min readJul 16, 2024

--

MemChatGPT-Extension is a Chrome extension designed to enhance your workflow by integrating OpenAI’s ChatGPT with Mem AI. This tool allows you to extract content from web pages, process it through ChatGPT, and then seamlessly push it to Mem.

Installation

To install MemChatGPT-Extension in Chrome:

  1. Clone or download the repository from GitHub: https://github.com/thomaspernet/MemChatGPT-Extension/tree/main
  2. Open Chrome and navigate to chrome://extensions/.
  3. Enable “Developer mode” at the top right corner.
  4. Click on “Load unpacked” and select the directory of your downloaded extension.

Setting Up API Keys

Mem API Key

  1. Go to Mem AI API setup page.
  2. Create a new API key and securely copy it.
  3. Keep this key confidential.

ChatGPT API Key

  1. Visit OpenAI API keys page to set up your API key.
  2. Note: Obtaining this key requires a credit card. Refer to OpenAI’s pricing for detailed information.

Using the Extension

Templates for Mem

In MemChatGPT-Extension, templates are used to format content before pushing to Mem. Templates can include placeholders for title, date, and URL. Use {title}, {date}, and {url} as placeholders in your templates. For instance:

# {title}
- Date: {date}
- URL: {url}

Adding a Template

  1. Click on the “Create Mem Template” tab.
  2. Enter a name for your template.
  3. In the template area, enter your template using the placeholders.
  4. Click “Create Template”.

Prompts for ChatGPT

Prompts are used by ChatGPT to process the content.

Adding a Prompt

  1. Navigate to the “Create ChatGPT Prompt” tab.
  2. Provide a name for your prompt.
  3. Enter the ChatGPT prompt details in the provided area.
  4. Click “Create Prompt”.

I use this prompt

Your output should use the following template:

### Summary

### Facts

- Bulletpoint

### Concepts

- bulletpoints

### Keywords

- Bulletpoint

Please provide a text for summarization. Your task is to summarize the text in up to 10 bullet points, starting with a detailed and concise summary. Include a maximum of 8 relevant keywords to highlight key aspects. Extract the main concepts from the article and provide a brief explanation in the Concept section.

Extracting and Processing Content

  1. In the Main tab, select one Mem template and ChatGPT prompt.
  2. Click “Extract Content” while on a web page to pull its text content.
  3. The content is processed through ChatGPT and displayed in the output area. You can edit this content before pushing it to Mem.

If chatGPT API is incorrect, you will see this error

Collection Feature

The Collection feature in Mem enhances your content organization by allowing you to tag your mems with relevant keywords. It’s an optional feature that provides you with the flexibility to associate your content with custom tags, making it easier to categorize and retrieve later in Mem.

How to Use the Collection Feature

  1. In the Main tab, you’ll find a new input field labeled “Type or select a keyword (hit enter to validate the keyword)”.
  2. Begin typing a keyword. If the keyword already exists in your collection, it will appear in the dropdown menu for you to select. If it’s a new keyword, simply finish typing and press Enter to add it to your collection.
  3. The keyword will automatically be formatted according to Mem’s tagging standards:
  • Each keyword will be prefixed with a “#” symbol.
  • Spaces within keywords will be replaced with hyphens.
  1. The selected keywords will appear in a separate text box, each separated by a comma, ready to be added to your content.
  2. When you push your content to Mem, the selected keywords will be included. If the {collection} placeholder is present in your template, the keywords will replace it. Otherwise, the keywords will be appended at the bottom of your content.

Adding Keywords to Your Mem

Simply type your keyword and press Enter. The extension will handle the formatting and addition of the tag.

Collection Input

Selected Keywords

Remember, using the Collection feature is completely optional, but it can significantly enhance your content organization within Mem.

Pushing to Mem

  1. Optionally modify the processed content in the output area.
  2. Click “Push to Mem” to send the content to your Mem account.

Explainer

Mem “Explainer” feature generates detailed explanations for selected text using ChatGPT directly within a floating box on the webpage.

You can edit both the prompt and the selected text to refine the context and ChatGPT’s responses. The response, along with the webpage’s URL, is sent to Mem.

Security Note

Remember to keep your API keys private and securely stored. Avoid sharing them or embedding them in shared code repositories.

Feel free to reach out to me at t.pernetcoudrier@gmail.com or to fill a bug report here https://github.com/thomaspernet/MemChatGPT-Extension/issues

Details about the code can be found here:

I also write a more detailed article about my workflow

--

--