-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed the errors in the code! #25
base: master
Are you sure you want to change the base?
Conversation
FIxed some errors that were placed in the code and allows you to completely save a book! Increased word count and using a higher token limit with GPT-3.5.
Added all of my fixes and changes the way the book is saved with a random number in the filename as well as removing errors that were in the code but applying fixes to generate the structure of the book. |
)[0]} | ||
) | ||
elif chapter_information == []: | ||
## I can't figure out the code for this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds unfinished, does it work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this part of the code works so far I just formatted it differently
|
||
def get_chapter(self, chapter_index, prompt): | ||
if len(self.base_prompt) == 3: | ||
if len(self.base_prompt) <= 9: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This increase is because you're using 16k, right? So you can give more context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might have been the ghostwriter on replit but I'm not sure because I can't remember why I changed it in the first place
@@ -63,14 +65,16 @@ def main(): | |||
# Get the number of chapters | |||
print('How many chapters should the book have?') | |||
chapters = int(input('> ')) | |||
if chapters <= 1: | |||
words = 1 | |||
|
|||
# Get the number of words per chapter | |||
print('How many words should each chapter have?') | |||
# Check if it is below 1200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment probably needs to be updated as well, but I also found it weird to have min limit...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fooled around with a lot of the settings just testing what didn't work and I needed this to prevent something unwanted from happening. Right now the code works without all prompting because I have each setting fixed right now. I made it up to 10 chapters with 2000 words using the newer November gpt-3.5-turbo
structure, _ = book.get_structure() | ||
print(structure) | ||
structure = book.get_structure() | ||
print(book) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems like unwanted change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually how I'm using it right now and there are some changes to make testing a bit easier but I'm only have a problem getting the structure and yeah I changed it back to print structure instead of print book https://replit.com/@CJSTRYKER/AuthorGPT
FIxed some errors that were placed in the code and allows you to completely save a book! Increased word count and using a higher token limit with GPT-3.5.