mikavehns / BookGPT

Writes complete books with given paramters, using GPT-3.
MIT License
353 stars 66 forks source link

getting error when generating the book #3

Closed tahany91 closed 1 year ago

tahany91 commented 1 year ago

Generating a book with 2 chapters, 200 words per chapter, topic "How can I stay motivated" and category "SelfImprovement" in english. Initializing.. Traceback (most recent call last): File "C:\Users\adria\BookGPT\src\run.py", line 121, in main() File "C:\Users\adria\BookGPT\src\run.py", line 93, in main book = Book(chapters, words, topic, category, language) File "C:\Users\adria\BookGPT\src\book.py", line 56, in init self.structure = self.get_structure() File "C:\Users\adria\BookGPT\src\book.py", line 167, in get_structure word_count = paragraph.split('---')[1] IndexError: list index out of range

mikavehns commented 1 year ago

This error occurs, when gpt-3 does not adhere to the format templates (Happens maybe 1 in 500 generations). Just regenerate with the same attributes. In the near future I will add fine tuning to the bot, so that these errors don't happen.

Hope this helps!