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

Catch empty prompt #4

Merged
merged 2 commits into from
Mar 25, 2023
Merged

Catch empty prompt #4

merged 2 commits into from
Mar 25, 2023

Conversation

PraxTube
Copy link
Collaborator

@PraxTube PraxTube commented Mar 25, 2023

When writing and empty prompt, the script passes it on to ChatGPT, which doesn't make much sense. Added a guard clause to catch empty prompts.

I also refactored the main in chat.py to be more readable. If you don't want to implement this change and leave it as is, I will revert it and you can merge only the empty promt catch.

This change is purely for readability and it's value is thus subjective.
@efJerryYang
Copy link
Owner

Thank you for contributing! Your suggestions truly make sense, and I'll merge the pull request later after checking the code.

@efJerryYang efJerryYang merged commit 9d78167 into efJerryYang:main Mar 25, 2023
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