Closed SunilWarrier closed 1 year ago
This is happening on many different occasions also. I do not think this is only when you have a misspelt language. I did try to debug, and I can see that it is failing at a 'Total 300 Words', but at that point --- is missing. For all chapters in that list, you have --- before a number of words.
Hello, Thank you for opening an issue! The problem is that gpt-3 is not following the program's instructions. This may occur more likely, when you input "wrong" languages, etc. I currently don't know how to fix it, but maybe I will fix it in the future.
Describe the bug If you misspell the Language, then it will crash Eg. for English I used accidentally Enflish
To Reproduce Steps to reproduce the behavior: Run the program Give Enflish as a language A clear and concise description of what you expected to happen. It can be auto correct or only accept only expected. Screenshots Generating a book with 2 chapters, 1000 words per chapter, topic "Visit to Wales" and category "Travel" in Enflish. Initializing.. Traceback (most recent call last): File "C:\Development\Python\BookGPT\src\run.py", line 121, in
main()
File "C:\Development\Python\BookGPT\src\run.py", line 93, in main
book = Book(chapters, words, topic, category, language)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Development\Python\BookGPT\src\book.py", line 60, in init
self.structure = self.get_structure()
^^^^^^^^^^^^^^^^^^^^
File "C:\Development\Python\BookGPT\src\book.py", line 171, in get_structure
word_count = paragraph.split('---')[1]