# OpenThaiGPT
[![](https://img.shields.io/pypi/v/openthaigpt.svg)](https://pypi.python.org/pypi/openthaigpt) [![](https://pyup.io/repos/github/OpenThaiGPT/openthaigpt/shield.svg)](https://pyup.io/repos/github/OpenThaiGPT/openthaigpt/)
OpenThaiGPT focuses on developing a Thai Chatbot system to have capabilities equivalent to ChatGPT, as well as being able to connect to external systems and be able to retrieve data flexibly. Easily expandable and customizable and developed into Free open source software for everyone.
* Free software: Apache Software License 2.0
* Project Homepage: https://openthaigpt.aieat.or.th
* Documentation: https://openthaigpt.readthedocs.io.
## Features
* You can now select the model_name as follows:
* kobkrit/openthaigpt-0.1.0-alpha
* kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.4
* kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.3
* kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.2
* kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.1
## Installation
Python>=3.6
### CPU-Only
``$ pip install openthaigpt torch --extra-index-url https://download.pytorch.org/whl/cpu``
### GPU
CUDA 11.6
``$ pip install openthaigpt torch --extra-index-url https://download.pytorch.org/whl/cu116``
CUDA 11.7
``$ pip install openthaigpt torch``
## Usage
```
import openthaigpt
print(openthaigpt.generate("Q: อยากลดความอ้วนทำไง\n\nA:"))
print(openthaigpt.zero("การลดน้ำหนักเป็นเรื่องที่ต้องพิจารณาอย่างละเอียดและรอบคอบเพื่อให้ได้ผลลัพธ์ที่ดีและมีประสิทธิภาพมากที่สุด"))
```
## Using 0.1.0-alpha model
```
import openthaigpt
print(openthaigpt.generate(instruction="แปลภาษาอังกฤษเป็นภาษาไทย", input="We want to reduce weight.", model_name = "kobkrit/openthaigpt-0.1.0-alpha", min_length=50, max_length=300, top_k=20, num_beams=5, no_repeat_ngram_size=20, temperature=1, early_stopping=True))
```
## Collaboration By
* Artificial Intelligence Entrepreneur Association of Thailand (AIEAT)
* Artificial Intelligence Association of Thailand (AIAT)
## Supported By
* NECTEC
* iApp Technology
* Pantip
* NVIDIA
* Microsoft
* Mahidol University
* Gitbook
# History
0.1.0 (2023-04-23)
* Update Model to Version 0.1.0-alpha (https://huggingface.co/kobkrit/openthaigpt-0.1.0-alpha)
0.0.9 - 0.0.10 (2023-03-19)
* Release OpenThaiGPT Zero
0.0.8 (2023-03-12)
* Update Readme
0.0.7 (2023-03-12)
* Update Model to Version 0.0.4 (https://huggingface.co/kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.4)
0.0.6 (2023-03-05)
* Update README
0.0.5 (2023-02-28)
* First release on PyPI.
Raw data
{
"_id": null,
"home_page": "https://github.com/OpenThaiGPT/openthaigpt",
"name": "openthaigpt",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "openthaigpt",
"author": "Kobkrit Viriyayudhakorn",
"author_email": "kobkrit@iapp.co.th",
"download_url": "https://files.pythonhosted.org/packages/44/41/648396c234be81e2578c3266d0ef690ff2372d1622b271e379a6719de1cc/openthaigpt-0.1.0.tar.gz",
"platform": null,
"description": "# OpenThaiGPT\n\n[![](https://img.shields.io/pypi/v/openthaigpt.svg)](https://pypi.python.org/pypi/openthaigpt) [![](https://pyup.io/repos/github/OpenThaiGPT/openthaigpt/shield.svg)](https://pyup.io/repos/github/OpenThaiGPT/openthaigpt/)\n\nOpenThaiGPT focuses on developing a Thai Chatbot system to have capabilities equivalent to ChatGPT, as well as being able to connect to external systems and be able to retrieve data flexibly. Easily expandable and customizable and developed into Free open source software for everyone.\n\n* Free software: Apache Software License 2.0\n* Project Homepage: https://openthaigpt.aieat.or.th\n* Documentation: https://openthaigpt.readthedocs.io.\n\n## Features\n\n* You can now select the model_name as follows:\n* kobkrit/openthaigpt-0.1.0-alpha\n* kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.4\n* kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.3\n* kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.2\n* kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.1\n\n## Installation\nPython>=3.6\n\n### CPU-Only\n``$ pip install openthaigpt torch --extra-index-url https://download.pytorch.org/whl/cpu``\n\n### GPU\n\nCUDA 11.6\n``$ pip install openthaigpt torch --extra-index-url https://download.pytorch.org/whl/cu116``\n\nCUDA 11.7\n``$ pip install openthaigpt torch``\n\n## Usage\n```\nimport openthaigpt\n\nprint(openthaigpt.generate(\"Q: \u0e2d\u0e22\u0e32\u0e01\u0e25\u0e14\u0e04\u0e27\u0e32\u0e21\u0e2d\u0e49\u0e27\u0e19\u0e17\u0e33\u0e44\u0e07\\n\\nA:\"))\nprint(openthaigpt.zero(\"\u0e01\u0e32\u0e23\u0e25\u0e14\u0e19\u0e49\u0e33\u0e2b\u0e19\u0e31\u0e01\u0e40\u0e1b\u0e47\u0e19\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e1e\u0e34\u0e08\u0e32\u0e23\u0e13\u0e32\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e41\u0e25\u0e30\u0e23\u0e2d\u0e1a\u0e04\u0e2d\u0e1a\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e43\u0e2b\u0e49\u0e44\u0e14\u0e49\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c\u0e17\u0e35\u0e48\u0e14\u0e35\u0e41\u0e25\u0e30\u0e21\u0e35\u0e1b\u0e23\u0e30\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e20\u0e32\u0e1e\u0e21\u0e32\u0e01\u0e17\u0e35\u0e48\u0e2a\u0e38\u0e14\"))\n```\n\n## Using 0.1.0-alpha model\n```\nimport openthaigpt\n\nprint(openthaigpt.generate(instruction=\"\u0e41\u0e1b\u0e25\u0e20\u0e32\u0e29\u0e32\u0e2d\u0e31\u0e07\u0e01\u0e24\u0e29\u0e40\u0e1b\u0e47\u0e19\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22\", input=\"We want to reduce weight.\", model_name = \"kobkrit/openthaigpt-0.1.0-alpha\", min_length=50, max_length=300, top_k=20, num_beams=5, no_repeat_ngram_size=20, temperature=1, early_stopping=True))\n```\n\n## Collaboration By\n* Artificial Intelligence Entrepreneur Association of Thailand (AIEAT)\n* Artificial Intelligence Association of Thailand (AIAT)\n\n## Supported By\n* NECTEC\n* iApp Technology\n* Pantip\n* NVIDIA\n* Microsoft\n* Mahidol University\n* Gitbook\n\n# History\n\n0.1.0 (2023-04-23)\n\n* Update Model to Version 0.1.0-alpha (https://huggingface.co/kobkrit/openthaigpt-0.1.0-alpha)\n\n0.0.9 - 0.0.10 (2023-03-19)\n\n* Release OpenThaiGPT Zero\n\n0.0.8 (2023-03-12)\n\n* Update Readme\n\n0.0.7 (2023-03-12)\n\n* Update Model to Version 0.0.4 (https://huggingface.co/kobkrit/openthaigpt-gpt2-instructgpt-poc-0.0.4)\n\n0.0.6 (2023-03-05)\n\n* Update README\n\n0.0.5 (2023-02-28)\n\n* First release on PyPI.\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "OpenThaiGPT focuses on developing a Thai Chatbot system to have capabilities equivalent to ChatGPT, as well as being able to connect to external systems and be able to retrieve data flexibly. Easily expandable and customizable and developed into Free open source software for everyone.",
"version": "0.1.0",
"split_keywords": [
"openthaigpt"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9014d6f1de580d48bcae0f2f79c4141040759a87f029e253f5551f39c566dd44",
"md5": "bce234ca5d2bfdfa78432d99bbd5ffa3",
"sha256": "bf7b1ade8677040ff5722ba844da069dd82e067787be9d464851c0ef945fab11"
},
"downloads": -1,
"filename": "openthaigpt-0.1.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "bce234ca5d2bfdfa78432d99bbd5ffa3",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.6",
"size": 4864,
"upload_time": "2023-04-23T17:05:38",
"upload_time_iso_8601": "2023-04-23T17:05:38.877135Z",
"url": "https://files.pythonhosted.org/packages/90/14/d6f1de580d48bcae0f2f79c4141040759a87f029e253f5551f39c566dd44/openthaigpt-0.1.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4441648396c234be81e2578c3266d0ef690ff2372d1622b271e379a6719de1cc",
"md5": "cbe8ece267e9ae140b56c5ca6472c769",
"sha256": "52b011ec90009483819c69ba159c46e9694a644c40b95b309af5e3768a83dc95"
},
"downloads": -1,
"filename": "openthaigpt-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "cbe8ece267e9ae140b56c5ca6472c769",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 11414,
"upload_time": "2023-04-23T17:05:40",
"upload_time_iso_8601": "2023-04-23T17:05:40.998413Z",
"url": "https://files.pythonhosted.org/packages/44/41/648396c234be81e2578c3266d0ef690ff2372d1622b271e379a6719de1cc/openthaigpt-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-23 17:05:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "OpenThaiGPT",
"github_project": "openthaigpt",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"requirements": [],
"tox": true,
"lcname": "openthaigpt"
}