Skip to content

cameronball/ai-reading-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚💡 AI Reading Finder

tl;dr 📝

After entering your favourite titles, the AI will fetch the given book's data such as title, genre, and summary. All this info is given to ChatGPT using a prompt template which will then return book reccomendations!

Table of Contents 🗂️

Description 📚

The AI Reading Finder 🤖📚 works by utilising two main technologies: Goodreads 📖 for fetching book data, and OpenAI's ChatGPT 🧠 for generating AI recommendations.

  • Goodreads 📖: I use Goodreads to get the details about the supplied favorite books 📚, including the book title 🏷️, author 🖋️, genres 🏷️, and synopsis 📝. This script will then extract this data and use it to generate AI personalized book recommendations 🎯.

  • OpenAI's ChatGPT 🧠: I use ChatGPT to generate AI book recommendations based on the book data fetched from Goodreads 📖. We supply ChatGPT with a conversation context 🗨️ where the user talks about their favorite books (the data fetched from Goodreads). The AI then responds with book recommendations 📚 in a conversational manner.

Usage 🛠️

Requirements ⚙️

  • Python 3.7 and above 🐍
  • An OpenAI API key 🔑
  • Git 📚

Here is detailed explanation for installing all the dependencies 🧩.

Getting Started 🚀

  1. Clone this repository on your local machine.
git clone https://github.com/decisivedevops/ai-book-recommender.git
  1. Navigate to the repository.
cd ai-book-recommender/
  1. Create a Python virtual environment and activate it.
python3 -m venv venv
source venv/bin/activate
  1. Install the necessary dependencies.
 pip install -r requirements.txt
  1. Rename the sample.config.toml file to config.toml:
mv sample.config.toml config.toml
  1. Open the config.toml file and update your OpenAI API key in the appropriate field.

  2. Update your favorite books info in the config.toml file. Follow the provided format and add the titles and authors of your favorite books.

[books]
favorites = """
Book Title, Author
Book Title, Author
Book Title, Author
"""
  1. Run the main.py script:
python3 main.py
  1. The script gives reading recommendations based on your favorite books. The suggestions are also saved in the logs folder.

Configuration ⚙️

The configuration file, config.toml, has various settings used by the script:

  • OpenAI settings, including the model name, temperature, and API key 🌡️.
  • A list of your favorite books 📚.
  • Message templates used when interacting with ChatGPT 💌.

License 📜

AI Reading Finder is open source and available under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages