https://github.com/asirihewage/chatgpt-intl
Enhanced ChatGPT Wrapper for Internationalization - NodeJS
https://github.com/asirihewage/chatgpt-intl
chatgpt inttl language nodejs support wrapper
Last synced: 14 days ago
JSON representation
Enhanced ChatGPT Wrapper for Internationalization - NodeJS
- Host: GitHub
- URL: https://github.com/asirihewage/chatgpt-intl
- Owner: asirihewage
- License: mit
- Created: 2023-01-16T07:23:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-10T10:58:56.000Z (over 1 year ago)
- Last Synced: 2025-04-15T00:52:17.818Z (14 days ago)
- Topics: chatgpt, inttl, language, nodejs, support, wrapper
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/chatgpt-intl
- Size: 787 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
- Support: SUPPORTED_LANGUAGES.md
Awesome Lists containing this project
README
# chatGPT-intl


### 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.
## Installation
Install chatgpt-intl via npm : https://www.npmjs.com/package/chatgpt-intl
```bash
npm i chatgpt-intl
```## Usage/Examples
First, you have to obtain your API key from OPENAI, then you can use it here.
```javascript
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](https://github.com/asirihewage/chatGPT-intl/blob/main/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](https://github.com/asirihewage/chatGPT-intl/blob/main/SUPPORTED_LANGUAGES.md)## Demo
```shell
npm run demo
```
Sample App I created.
## Authors
- [@asirihewage](https://github.com/asirihewage)
## Contributions
- Issues and feature updates are welcome.
## License
[MIT](https://choosealicense.com/licenses/mit/)