Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mckaywrigley/kindle-gpt
Come join the best place on the internet to learn AI skills. Use code "kindlegpt" for an extra 20% off.
https://github.com/mckaywrigley/kindle-gpt
Last synced: 2 days ago
JSON representation
Come join the best place on the internet to learn AI skills. Use code "kindlegpt" for an extra 20% off.
- Host: GitHub
- URL: https://github.com/mckaywrigley/kindle-gpt
- Owner: mckaywrigley
- License: mit
- Created: 2023-03-08T22:17:01.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-10T21:34:46.000Z (almost 2 years ago)
- Last Synced: 2025-01-09T01:43:45.437Z (17 days ago)
- Language: TypeScript
- Homepage: https://JoinTakeoff.com
- Size: 123 KB
- Stars: 259
- Watchers: 6
- Forks: 22
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
- awesome-chatgpt - kindle-gpt - Search and chat on your Kindle highlights. (Web apps / Hosted and self-hosted)
- awesome-ChatGPT-repositories - kindle-gpt - AI search & chat on your Kindle highlights. (Others)
- awesome-chatgpt - kindle-gpt - Search and chat on your Kindle highlights. (Web apps / Hosted and self-hosted)
- my-awesome - mckaywrigley/kindle-gpt - 03 star:0.3k fork:0.0k Come join the best place on the internet to learn AI skills. Use code "kindlegpt" for an extra 20% off. (TypeScript)
- awesome-gpt - kindle-gpt
README
# Kindle GPT
AI search & chat on your Kindle highlights.
Supports .csv exporting of your embedded data.
Code is 100% open source.
Note: I recommend using on desktop only.
## How It Works
### Export Kindle Notebook
In the Kindle App you can export your highlights as a notebook.
The notebook provides you with a .html file of your highlights.
### Import & Parse Kindle Highlights
Import the .html file into the app.
It will parse the highlights and display them.
### Generate Embeddings
After parsing is complete, the highlights are ready to be embedded.
Kindle GPT uses [OpenAI Embeddings](https://platform.openai.com/docs/guides/embeddings) (`text-embedding-ada-002`) to generate embeddings for each highlight.
The embedded text is the chapter/section name + the highlighted text. I found this to be the best way to get the most relevant passages.
You will also receive a downloaded .csv file of your embedded notebook to use wherever you'd like - including for importing to Kindle GPT for later use.
### Search Embedded Highlights
Now you can query your highlights using the search bar.
The 1st step is to get the cosine similarity for your query and all of the highlights.
Then, the most relevant results are returned (maxing out at ~2k tokens, up to 10).
### Create Prompt & Generate Answer
The results are used to create a prompt that feeds into GPT-3.5-turbo.
And finally, you get your answer!
## Data
All data is stored locally.
Kindle GPT doesn't use a database.
You can re-import any of your generated .csv files at any time to avoid having to re-embed your notebooks.
## Running Locally
1. Set up OpenAI
You'll need an OpenAI API key to generate embeddings and perform chat completions.
2. Clone repo
```bash
git clone https://github.com/mckaywrigley/kindle-gpt.git
```3. Install dependencies
```bash
npm i
```4. Run app
```bash
npm run dev
```## Contact
If you have any questions, feel free to reach out to me on [Twitter](https://twitter.com/mckaywrigley)!