Giter Club home page Giter Club logo

openai-grammar-correction's Introduction

OpenAI Nodejs API Examples with Grammar Correction and Speech to Text - OpenAI API

nodejs angular openai ai example project grammar gpt gpt3

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.

  1. Angular15
  2. Nodejs

Installation

Follow the below steps to make it run the project in your environment;

  1. run npm install in the main directory
  2. visit openai.com and register
  3. get your API_KEY under account menu
  4. create .env in the main directory and paste your API key in it OPENAI_API_KEY=$YOURAPIKEY
  5. run node index.js in the main directory
  6. Now Nodejs backend are working!
  7. launch 2nd terminal and cd app
  8. cd openai-grammar-correction
  9. npm install
  10. ng serve
  11. Now Angular App also running, visit http://localhost:4200

OpenAI Implementation

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,
});

Contribution & Support

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:

[email protected]

[email protected]

openai-grammar-correction's People

Contributors

fishonamos avatar mobilerast avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

openai-grammar-correction's Issues

How can the install vercel?

Hi, I want to install vercel, But I encountered an accident and the installation failed. I forked your project and tried to deploy it in Vercel. Although it was successful, it seems to have failed to launch.
image

logs:

[14:38:58.040] Running build in Cleveland, USA (East) โ€“ cle1
[14:38:58.106] Cloning github.com/wleelw/openai-grammar-correction (Branch: main, Commit: 8c3b1f6)
[14:38:58.351] Previous build cache not available
[14:38:58.617] Cloning completed: 510.612ms
[14:38:58.762] Running "vercel build"
[14:38:59.293] Vercel CLI 29.2.0
[14:38:59.466] Build Completed in /vercel/output [22ms]
[14:38:59.591] Deploying outputs...
[14:39:00.784] Deployment completed
[14:39:01.254] Uploading build cache [29.00 B]...
[14:39:01.553] Build cache uploaded: 298.552ms

browser view:
image

I am a high school student and I would like to use your program to modify my grammar. Please help me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.