Socket
Socket
Sign inDemoInstall

openai-grammaticalcorrection

Package Overview
Dependencies
2
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    openai-grammaticalcorrection

This package is a built on top of [openai-api](https://www.npmjs.com/package/openai-api) for getting grammatical corrections in any sentence.


Version published
Maintainers
1
Install size
459 kB
Created

Readme

Source

Overview

This package is a built on top of openai-api for getting grammatical corrections in any sentence.

If you find any issue you message me or open a PR.

Installation

npm i openai-grammaticalcorrection

Usage


const openai = require('openai-grammaticalcorrection')

openai.APIkey(process.env.OPENAI_API_KEY);
(async () => {
    const data = await openai.GetError('She no went to the market.')

    console.log(data);
})();

Output should be as

{
  id: 'cmpl-4AnafCXtp8GCYELLzdY9tgZDyTxC5',
  object: 'text_completion',
  created: 1638479253,
  model: 'davinci:2020-05-03',
  choices: [
    {
      text: " She didn't go to the market.",
      index: 0,
      logprobs: null,
      finish_reason: 'stop'
    }
  ]
}


Text Completion

(async () => {
    const data = await openai.GetResponse('Who are you?');

    console.log(data);
})();

Output should be as

{
  id: 'cmpl-4IvLnvGTRNf3JG5Ohswj8wgjE1EOm',
  object: 'text_completion',
  created: 1640415707,
  model: 'davinci:2020-05-03',
  choices: [
    {
      text: ' I am your AI TSB.',
      index: 0,
      logprobs: null,
      finish_reason: 'stop'
    }
  ]
}

FAQs

Last updated on 25 Dec 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc