Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CJStryker
Copy link

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.

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.
@CJStryker
Copy link
Author

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.

CJStryker

This comment was marked as duplicate.

)[0]}
)
elif chapter_information == []:
## I can't figure out the code for this

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?

Copy link
Author

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:

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?

Copy link
Author

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

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...

Copy link
Author

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)

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?

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants