larksq7k downloadsQuick note taking with the help of LLMs. LLMs help you to summarize / organize PDFs or existing notes.
Automate summary and concept defining in Obsidian.
Minimize your efforts for lazy note-takers. Before your readings, summarize all PDF files in a folder to your vault with the power of LLMs (like GPTs from OpenAI). During your readings, define concepts to new *.MD notes and create a link to each.
Currently suits academic paper readings the best.
Summarize PDF Files: Automatically generate summaries for PDF files on batch using OpenAI’s GPT models. The summaries are structured in markdown with a recommended default structure.
Create New Concept Notes: Create new notes from selected text with a single command. The plugin will generate a markdown file with the selected text as the title.
Install Dependency
For MacOS users:
Before installation, you can check your systemwide version of Python and Pip by using which command to determine pip or pip3 (Let's take pip3 for example).
pip3 install openai, arxiv, pymupdfpip3 install openai, arxiv, pymupdf --break-system-packagesFor Windows users:
Install by running pip install openai, arxiv, pymupdf in your terminal.
OpenAI API Key Requested: Before you start, you need an OpenAI API key to make LLM Summary function properly. Create one from their website if you don't have one.
Python Environment Requested: You also need a functioning Python environment. Mac users have a default Python environment. And it's easy to setup on a Windows machine too.
New Vault Recommended: We recommend you start a new vault to avoid any possible conflicts since LLM Summary works on a specific folder setup.
Follow these steps to install from the official Obsidian plug-in store:
Follow these steps to install from github repo (npm requested):
<VaultFolder>/.obsidian/plugins/.npm config set registry https://registry.npmjs.org/. Otherwise, you may encounter issues where certain versions of npm packages cannot be found. npm install and then run npm run dev to start.Now you should have the folder structure like this:
- Attachments
- Concepts // new concepts saved here
- Files
- - PDFs // your pdf files to summary
- Notes // summary notes saved here
- - Read
- Topics
Now you are good to go. We recommend the plugin Image Converter for image compressions.
You need to run the summary_pdf_folder.py script (find it in your plug-in folder). To use the summarization feature, first setup your OpenAI API Key for Python script, full instructions from OpenAI:
Open Terminal: You can find it in the Applications folder or search for it using Spotlight (Command + Space).
Edit Bash Profile: Use the command nano ~/.bash_profile or nano ~/.zshrc (for newer MacOS versions) to open the profile file in a text editor.
Add Environment Variable: In the editor, add the line below, replacing your-api-key-here with your actual API key:
export OPENAI_API_KEY='your-api-key-here'
Save and Exit: Press Ctrl+O to write the changes, followed by Ctrl+X to close the editor.
Load Your Profile: Use the command source ~/.bash_profile or source ~/.zshrc to load the updated profile.
Verification: Verify the setup by typing echo $OPENAI_API_KEY in the terminal. It should display your API key.
Open Command Prompt: You can find it by searching "cmd" in the start menu.
Set environment variable in the current session: To set the environment variable in the current session, use the command below, replacing your-api-key-here with your actual API key:
setx OPENAI_API_KEY "your-api-key-here"
This command will set the OPENAI_API_KEY environment variable for the current session.
python summary_pdf_folder.pyThis script will search for all PDF files, summarize them, and save the result into the output folder in your vault. The summary will be formatted with the following sections:
You can change the pdf_folder, output_folder, or openai_api_key by passing arguments into the Python script. You can also automatically delete these PDF files by setting delete_pdf to True.
We strongly recommend setting a hotkey for this command to avoid interruptions during your reading. Click 'Settings...' -> 'Hotkeys', and search 'LLM Summary' to setup a hotkey for the 'New concept from selected' command.
This command will create a new markdown file in the Concepts folder with the selected text as the file name.