This NodeJS module acts as a wrapper for ChatGPT API and will help you to use ChatGPT in your own language.
Install chatgpt-intl via pip : https://pypi.org/project/pyChatGPT-intl/
pip install pyChatGPT-intl
First, you have to obtain your API key from OPENAI, then you can use it here.
from pyChatGPT-intl import PyChatGPTIntl
api_key = "sk-Z9bfKN34RT***********RtH4j0FCacAxD"
desired_lang ="si"
opts = {
"model": "text-davinci-003",
"temperature": 0.5,
"max_tokens": 100,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0
}
pyChatGPTIntl = PyChatGPTIntl(api_key, desired_lang, opts)
print(pyChatGPTIntl.generate_text("ශ්රී ලංකාව ගැන මට විස්තරයක් කියන්න"))
text - Type: string (The text to be translated)
api_key - Type: string (API Key obtained from OpenAI Developer Account)
opts - Type: object (OpenAI Language Model and hyperparameters)
desired_lang - Type: string ( Must be auto
or one of the codes (not case-sensitive) contained in SUPPORTED_LANGUAGES.md.)
- Use ChatGPT API in your own language
- Ability to customize the chatGPT model
- Supports more than 50 languages
- Does not support for syntax and codes
- Does not support larger text inputs
Supported language codes contained in SUPPORTED_LANGUAGES.md
python3 chatGPT-intl.py
- Issues and feature updates are welcome.