1.1.0 • Published 2 years ago

openai-grammaticalcorrection v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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'
    }
  ]
}
1.1.0

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago