Skip to main content

BookGPT (Beta)

This program uses the GPT-3 API to generate books based on your specified parameters.



Installation

To install this program, simply follow these steps:

  1. Clone this repository to your local machine by running the following command in your terminal:
git clone https://github.com/mikavehns/BookGPT.git
  1. Navigate to the root directory of the repository using cd BookGPT/src

  2. Install the required dependencies by running the following command:

pip install -r requirements.txt

Prerequisites

In order to use this program, you must have a GPT-3 API key. The API Key must then be inserted into the config.json file.

Usage

To use this program, simply run the following command in your terminal:

python run.py

You will then be prompted to enter the following information:

  • Chapter Amount: The amount of chapters you want the book to have.

  • Chapter Length: The amount of words you want each chapter to have.

  • Topic: The topic you want the book to be about.

  • Category: The type of book you want to generate. (Science, Biography, etc.)

The program will then generate a Title and Chapter Titles + Content. You will get a detailed structure of the book.

The generated books will then be saved in the books folder and will be named after the title of the book.

Examples

Here are some examples:

  • Generate book with 5 chapters and 300 words per chapter, with quotes as chapter title, with the topic "success":

https://user-images.githubusercontent.com/66560242/210459589-751c82d7-e874-4119-a09a-cc36ea2be73c.mp4

  • You can see all examples in the examples/ directory.

Notes

  • The run.py file is just one example on how to use the book generator. You can also implement it into a website, discord bot, desktop app, etc.

  • The program may take some time to run, depending on the specified parameters and the performance of the GPT-3 API. Please be patient while the book is being generated.

  • The program may not always generate the wished amount of words for each chapter. This can happen, if there is not enough data available for the specified topic.

  • Currently, it is only possible to generate Non-Fiction books.

  • Since this is a really early version (v0.6.2), there are many missing features, that will be added by time

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

  • If you are interested in contributing to BookGPT, I welcome any suggestions or pull requests. Please feel free to open an issue or submit a pull request on the GitHub repository.

  • You can also submit your books, which I will then add to the examples folder. Just open a pull request with the book in the examples folder.

Metadata

Release files for bookgpt 0.6.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bookgpt 0.6.2.1
File Size Uploaded
bookgpt-0.6.2.1.tar.gz 10.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bookgpt 0.6.2.1
File Interpreter ABI Platform
bookgpt-0.6.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.5 kB

Release files / bookgpt-0.6.2.1.tar.gz

Download URL bookgpt-0.6.2.1.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fdebee1117c78616e27ef2ef021495d0e4f550c9b228bc66cd0fb9409b7442f0
BLAKE2b-256 checksum
How to use checksums
c599c51594c83844c6a39e2648ace0f2d165d257af848e133986799d6cf1a8e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release files / bookgpt-0.6.2.1-py3-none-any.whl

Download URL bookgpt-0.6.2.1-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eca4af942371483afed7b62bac574d200928541b44cedce9cf4b3bafef124f3c
BLAKE2b-256 checksum
How to use checksums
1f073c5c83bb587258d5624f162f5411c8cb28b891cc2a9e483cc04987d49b5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release history Release notifications | RSS feed

This release

0.6.2.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page