This is a React app that allows users to generate brief reviews for a store based on keywords and a rating. It uses OpenAI's GPT-3.5 model to generate the reviews.
Make sure you have the following installed:
-
Clone the repository:
git clone https://github.com/your-username/react-review-app.git
-
Navigate into the project directory:
cd react-review-app
-
Install dependencies:
Run the following command to install the required dependencies:
npm install
-
Set up the
.env
file:In the root of the project, create a
.env
file to store your OpenAI API key. You can create this file manually or use the following command to create it:touch .env
Then, add your OpenAI API key to the
.env
file with the following format:VITE_OPENAI_API_KEY=your-api-key-here
Replace
your-api-key-here
with your actual OpenAI API key. -
Start the development server:
Run the following command to start the React development server:
npm run dev
- Enter the keywords related to the store you want to review.
- Select a rating (1 to 5 stars).
- Click the Submit button to generate a brief review.
- The generated review will appear below the form.
Your OpenAI API key should be stored as an environment variable in the .env
file. This is how the app interacts with OpenAI's GPT-3.5 model.
VITE_OPENAI_API_KEY
: Your OpenAI API key (as a string).