The AI Chat and Image App is a React-based application that allows users to interact with an AI using OpenAI's GPT-3 for chat responses and DALL-E for image generation based on text prompts.
Ensure you have the following installed:
- Node.js/npm (npm at least version
18.16.0
).
Create .env
file and set up REACT_APP_OPENAI_API_KEY=
To set up the AI Chat and Image App, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/ai-chat-and-image-app.git cd ai-chat-and-image-app
-
Install the required npm packages:
npm install
To run the AI Chat and Image App, perform the following:
-
Set the
REACT_APP_OPENAI_API_KEY
environment variable with your OpenAI API key:Unix-like systems:
export REACT_APP_OPENAI_API_KEY={your_key}
Windows Command Prompt:
set REACT_APP_OPENAI_API_KEY={your_key}
Windows PowerShell:
$env:REACT_APP_OPENAI_API_KEY="{your_key}"
-
Start the application:
npm run start
This command will launch the app in your web browser at http://localhost:3000
.
If you wish to contact me, email at [email protected]
.