This project helps you to correct your English sentences to Standard English with the help of OpenAI API. Paste your text, AI will help you to perfect it.
This project consists of 2 app project.
- Angular15
- Nodejs
Follow the below steps to make it run the project in your environment;
- run
npm install
in the main directory - visit openai.com and register
- get your API_KEY under account menu
- create
.env
in the main directory and paste your API key in itOPENAI_API_KEY=$YOURAPIKEY
- run node index.js in the main directory
- Now Nodejs backend are working!
- launch 2nd terminal and
cd app
cd openai-grammar-correction
npm install
ng serve
- Now Angular App also running, visit http://localhost:4200
Code below in grammerCorrection.controller.js helps us to correct our English sentences.
const completion = await openai.createCompletion({
model: "text-davinci-003",
prompt: `Correct this to standard English:\n\n${req.body.userText}.`,
temperature: 0,
max_tokens: 60,
top_p: 1.0,
frequency_penalty: 0.0,
presence_penalty: 0.0,
});
Follow the Issue template for informing about the issues and for making contributions.
Follow us:
https://twitter.com/rastmobile
https://www.linkedin.com/company/rastmobile/
https://www.behance.net/rastmobile
Reach us: