openai / openai-quickstart-python

Python example app from the OpenAI API quickstart tutorial
https://platform.openai.com/docs/quickstart?context=python
MIT License
1.66k stars 1.31k forks source link

Update Flask web app for superhero name generation #68

Closed PARTHKPATIDAR closed 5 months ago

PARTHKPATIDAR commented 1 year ago

Refactored code for improved readability and maintainability.

Added a secret key for session management to enhance security.

Modified the OpenAI API call to generate three superhero names instead of one.

Implemented error handling and debug mode for better development experience.

Created a separate function for generating the OpenAI model prompt.

Updated HTML template for displaying the generated superhero names.