forked from MuiseDestiny/zotero-gpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
2,259 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,131 +1,59 @@ | ||
<div align="center"> | ||
<img src="imgs/background.png" width="50%" /> | ||
<h1 align="center"> | ||
Zotero-ChatPDF | ||
</h1> | ||
Zotero-ChatPDF is an advanced tool that integrates seamlessly with Zotero, enabling effortless interaction with PDF documents through state-of-the-art (SOTA) large language models (LLMs). It offers users the ability to ask questions, extract insights, and converse with PDFs directly, providing a powerful research assistant for scholars, researchers, and anyone who deals with large amounts of text in PDF format. | ||
|
||
# Key Features | ||
Effortless PDF Interaction: Chat with your PDFs directly in Zotero, asking questions and receiving detailed answers in natural language. | ||
|
||
SOTA Language Models: Powered by cutting-edge LLMs, such as gpt-4o, claude-3.5-sonnet and gemini-1.5-pro, offering highly accurate and contextually relevant responses. | ||
For Mac users, there are some excellent free and open-source models built in, such as llama3.1, gemma2, phi-3.5, etc. Now after free registration, they can be automatically downloaded, installed and used with just one click on the plugin page, and the model data is all locally stored, ensuring absolute privacy and security of the data | ||
|
||
# Awesome GPT | ||
Annotations and Highlights: Extract annotations and highlights from your PDFs and use them for deeper analysis and conversation. | ||
|
||
Full-text Search: Automatically scan and index the full text of PDFs to enable more precise question-answering. | ||
|
||
👋 | ||
Seamless Zotero Integration: Syncs directly with your Zotero library, making it easy to manage and query your documents without leaving the Zotero interface. | ||
|
||
|
||
Welcome to share your command tag [here](https://github.com/MuiseDestiny/zotero-gpt/discussions/3) using [Meet API](src/modules/Meet/api.ts). | ||
# How to Use | ||
Installation: Download [here](), Open Zotero. In the top menu bar, click on `Tools > Add-ons`. | ||
|
||
Click on the gear icon at the top right of the window. Click on `Install Add-on From File` and open the downloaded plugin file zotero-chatpdf.xpi. | ||
|
||
[![Using Zotero Plugin Template](https://img.shields.io/badge/Using-Zotero%20Plugin%20Template-blue?style=flat-round&logo=github)](https://github.com/windingwind/zotero-plugin-template) | ||
[![Latest release](https://img.shields.io/github/v/release/MuiseDestiny/zotero-gpt)](https://github.com/MuiseDestiny/zotero-gpt/releases) | ||
![Release Date](https://img.shields.io/github/release-date/MuiseDestiny/zotero-gpt?color=9cf) | ||
[![License](https://img.shields.io/github/license/MuiseDestiny/zotero-gpt)](https://github.com/MuiseDestiny/zotero-gpt/blob/master/LICENSE) | ||
![Downloads latest release](https://img.shields.io/github/downloads/MuiseDestiny/zotero-gpt/latest/total?color=yellow) | ||
Startup: In Zotero, press the keys to start the plugin, MacOS(command + enter), Windows(ctrl + enter). | ||
|
||
Select LLM models: For Windows users, after registering the OpenAI, Claude, and Gemini models can all be accessed and switched by one click. | ||
|
||
<img src="https://user-images.githubusercontent.com/51939531/228763331-90baa9aa-8bef-4b32-9d6f-35538b58b158.png" width="80%" /> | ||
For Mac users, after registering llama3.1, gemma2, phi-3.5 and mistral can all be used by just one click in plugin without extra need to install many additional tools or softwares. | ||
Now the registration is open and free! | ||
|
||
Chat with PDFs: Open any PDF and start asking questions. Zotero-ChatPDF will process the document and provide insightful responses. | ||
|
||
</div> | ||
Manage Insights: Save, export, or share the extracted insights, answers, and annotations from your conversations. | ||
|
||
Quit: Press esc key to exit. | ||
|
||
|
||
|
||
--- | ||
|
||
## 🚀 Main Features | ||
Features about GPT: | ||
- [x] 🔗 **Integrate with Zotero**: You can use the plugin to search and ask items in the library based on the selected text or the PDF file. | ||
- [x] 🧠 Use GPT to generate reply text: support `gpt-3.5-turbo` and `gpt-4` | ||
- [x] 🏷️ [Command tags](https://github.com/MuiseDestiny/zotero-gpt#command-tags): **Click once** to accelerate your research. | ||
- [x] 💬 Ask questions about current **PDF file** (full-text or selected text). | ||
- [x] 💬 Ask questions about **selected paper** (Abstract). | ||
- [x] 📝 **Summarize the selected paper** into several highly condensed sentences. | ||
- [x] 🔍 **Search items** in the library based on the selected text. | ||
- [x] ... ... | ||
- [x] ⚙️ **Advanced settings for GPT**: You can set the [api key](https://platform.openai.com/account/api-keys), [model name](https://platform.openai.com/docs/api-reference/chat/create#chat/create-model), [api url](https://platform.openai.com/docs/api-reference/chat/create), [temperature](https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature). | ||
- [x] 📚 **Integrate with Better Notes**: You can directly open this plugin when using [Better Notes](https://github.com/windingwind/zotero-better-notes). | ||
|
||
Features about UI: | ||
- [x] 🎨 **Real-time markdown rendering** for reply text: Latex and mathjax are supported. | ||
- [x] 🔍 **Zoom in and out** of the reply text or the size of the plugin window. | ||
- [x] 🖱️ **Move the plugin window to any position** on the screen. | ||
- [x] 📋 **Copy the reply text** to the clipboard. | ||
- [x] ⚠️ Detailed **error message** will be displayed when the request fails. | ||
- [x] 🔧 Compatible with **Zotero 6** and **Zotero 7**. | ||
- [x] 🎉 Discover more exciting features that are not listed here. | ||
|
||
|
||
## How to use | ||
- [x] Get `.xpi` file | ||
- [ ] [download latest](https://github.com/MuiseDestiny/zotero-gpt/releases/latest/download/zotero-gpt.xpi) release `.xpi` file | ||
- [ ] or build this project [1] to generate a `.xpi` file | ||
- [x] Install `.xpi` file in Zotero [2] | ||
- [x] Open Zotero GPT [3] | ||
- [x] Set your `OpenAI` secret key [4] | ||
|
||
### [1] Build the project | ||
Here is an example on how to build this project. For more information on how to build, please visit this project: [https://github.com/windingwind/zotero-plugin-template](https://github.com/windingwind/zotero-plugin-template) | ||
# Build the plugin | ||
If you like to build the plugin by yourself, do as the below commands: | ||
|
||
```bash | ||
git clone https://github.com/MuiseDestiny/zotero-gpt.git | ||
cd zotero-gpt | ||
git clone https://github.com/ljeagle/zotero-chatpdf.git | ||
cd zotero-chatpdf | ||
npm install | ||
npm run build | ||
``` | ||
The generated `.xpi` file in the build directory is the extension that you can install in Zotero. | ||
|
||
### [2] Install the extension in Zotero | ||
Open Zotero. In the top menu bar, click on `Tools > Add-ons`. | ||
Click on the gear icon at the top right of the window. Click on `Install Add-on From File` and open the generated `.xpi` file in the build directory from the previous step. | ||
|
||
### [3] Open/Exit Zotero GPT | ||
|
||
|Action|Shortcut| | ||
|--|--| | ||
|Open|<img src="https://github.com/MuiseDestiny/zotero-gpt/assets/51939531/f76b23ee-8c54-47da-823c-8c14faa88a87" width="20%">| | ||
|Exit|`ESC`| | ||
|Multi-line editing| `Shift` + `Enter`| | ||
|
||
### [4] Set up the API key | ||
|
||
![image](https://github.com/MuiseDestiny/zotero-gpt/assets/51939531/225c468a-acfc-43be-b5ac-cf6aaaa33e96) | ||
|
||
## Hi, Command Tag. | ||
> 👻 Follow the steps below, and you will gain a new understanding of command tags. | ||
|Step| Description | Supplementary Information | | ||
|----|-------------|---------------------------| | ||
|1 | Open Zotero GPT | Refer to [3] Open/Exit Zotero GPT | | ||
|2 | Type `#Tag Name` and press `Enter` | ![image](https://github.com/MuiseDestiny/zotero-gpt/assets/51939531/52f776fc-5592-4c17-8c36-7769c537ef79) | | ||
|3 | Input your prompt or code | ![image](https://github.com/MuiseDestiny/zotero-gpt/assets/51939531/6f6d9985-69e5-4d29-ba78-df31e30e9cd1) | | ||
|4 | **R**un your tag | Press `Ctrl + R` | | ||
|5 | **S**ave your tag | Press `Ctrl + S` | | ||
|6 | Long press a command tag to access the editing interface | ![image](https://github.com/MuiseDestiny/zotero-gpt/assets/51939531/28235117-79ab-43c6-b175-079e609683f4) | | ||
|7 | Modify the tag's color, position, or trigger; remember to save with `Ctrl + S` | ![image](https://github.com/MuiseDestiny/zotero-gpt/assets/51939531/5261878a-30ce-4ea5-b3be-9c6b9ef29f70) | | ||
|8 | Press `ESC` to exit the editing interface | Remember to save your changes with `Ctrl + S` before exiting | | ||
|9 | Long press the right mouse button to delete a tag | Note: Build-in tags do not support deletion | | ||
|
||
### How to run a command tag | ||
> Trigger is an attribute of a command tag, as are color and position. Long press any label to view/modify its trigger word. It supports both plain text and JS regular expressions. | ||
![How to run a command tag](https://github.com/MuiseDestiny/zotero-gpt/assets/51939531/fdfc369a-1e96-478c-a7c2-4a93d2d7a580) | ||
|
||
![image](https://github.com/MuiseDestiny/zotero-gpt/assets/51939531/d7f857a4-9ed9-42af-8662-6336ce70a881) | ||
|
||
|
||
### How to write a code block | ||
|
||
You can find some build-in APIs [here](https://github.com/MuiseDestiny/zotero-gpt/blob/bootstrap/src/modules/Meet/api.ts). | ||
|
||
A simple example: | ||
``` | ||
Summarize the following paragraph for me: | ||
${Meet.Zotero.getPDFSelection()} | ||
``` | ||
|
||
Here, the `Summarize the following paragraph for me:` represents plain text, while `${your code}` denotes a code snippet. Undoubtedly, if you are familiar with Zotero APIs, you can develop your own code. The code snippet will be executed, and the text returned by the code snippet will replace the code snippet. Finally, the replaced text will be input to GPT. So, theoretically, you can **accomplish all interactions** between Zotero and GPT using command tags. | ||
|
||
### How to navigate historical chats | ||
|
||
> Press the up (↑) and down (↓) keys on the keyboard to navigate. | ||
![image](https://github.com/MuiseDestiny/zotero-gpt/assets/51939531/ca2dcfbf-efb4-4ba3-8339-5277a879e3ea) | ||
|
||
## Support the project | ||
|
||
[Here](https://github.com/MuiseDestiny/zotero-reference#%E8%B5%9E%E5%8A%A9) | ||
The plugin file(zotero-chatpdf.xpi) will be built and generated into the build directory | ||
|
||
|
||
# Use Cases | ||
Research Assistance: Summarize research papers, identify key concepts, and quickly get answers to your questions. | ||
|
||
Academic Writing: Generate insights for literature reviews or dive deep into specific sections of papers. | ||
|
||
Collaborative Projects: Share annotated PDFs and responses with colleagues and teams for smoother collaboration. | ||
|
||
# Contributions | ||
Contributions to Zotero-ChatPDF are welcome! Please follow the standard GitHub process for submitting pull requests or reporting issues. | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1078,4 +1078,4 @@ | |
|
||
.markdown-body ::-webkit-calendar-picker-indicator { | ||
filter: invert(50%) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,13 @@ | |
"description": "__description__", | ||
"author": "__author__", | ||
"icons": { | ||
"48": "chrome/content/icons/[email protected].png", | ||
"96": "chrome/content/icons/favicon.png" | ||
"48": "chrome/content/icons/[email protected].ico", | ||
"96": "chrome/content/icons/favicon.ico" | ||
}, | ||
"permissions": [ | ||
"downloads", | ||
"downloads.open" | ||
], | ||
"applications": { | ||
"zotero": { | ||
"id": "__addonID__", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Oops, something went wrong.