1.0.10 • Published 1 year ago

chatgpt-intl v1.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

chatGPT-intl

Version Package Size

Enhanced ChatGPT Wrapper for Internationalization - NodeJS

This NodeJS module acts as a wrapper for ChatGPT API and will help you to use ChatGPT in your own language. Logo

Installation

Install chatgpt-intl via npm : https://www.npmjs.com/package/chatgpt-intl

  npm i chatgpt-intl

Usage/Examples

First, you have to obtain your API key from OPENAI, then you can use it here.

import ChatGPTIntl from 'chatgpt-intl';
import dotenv from "dotenv";
dotenv.config();

const text = "ChatGPT ගැන කියන්න"
const openAiKey = process.env.openAiKey
const lang = 'si';
const opts = {
    model: "text-davinci-003",
    temperature: 0.9,
    max_tokens: 150,
    top_p: 1,
    frequency_penalty: 0.0,
    presence_penalty: 0.6
};


ChatGPTIntl(text, openAiKey, opts, lang).then((res) => {
    console.log(res);
}).catch((er)=> {
    console.log(er);
});

API

text - Type: string (The text to be translated)

openAiKey - Type: string (API Key obtained from OpenAI Developer Account)

opts - Type: object (OpenAI Language Model and hyperparameters)

lang - Type: string ( Must be auto or one of the codes (not case sensitive) contained in SUPPORTED_LANGUAGES.md.)

Features

  • Use ChatGPT API in your own language
  • Ability to customize the chatGPT model
  • Supports more than 50 languages

Limitations

  • Does not support for syntax and codes
  • Does not support larger text inputs

Language Support

Supported language codes contained in SUPPORTED_LANGUAGES.md

Demo

npm run demo

Sample App I created. Demo

Authors

Contributions

  • Issues and feature updates are welcome.

License

MIT

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago