AI generated message with intent to reply on any message using OpenAI.
Reply to question with intent.
- Create react app.
npx create-react-app app_name
-
Replace App.js in src folder with above App.js (Frontend)
-
Add above index.js in root folder (Nodejs Backend)
-
Install OpenAI. Run following command
npm install openai
- Setup OpenAI organisation id and api key in index.js
const configuration = new Configuration({
organization: "your_organization_id",
apiKey: "your_api_key",
});
- Start react app using terminal command:
npm start
your application will start at port 3000
- Start nodejs server in another terminal using command:
node index.js
your server will start at port 3001