dg-chatgpt-0.1.5
توضیحات
Wrapper for OpenAI API, intended to be used for a discord bot powered by chatGPT.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | dg-chatgpt-0.1.5 |
| نام | dg-chatgpt |
| نسخه کتابخانه | 0.1.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | Ondřej Moravec <moravec@devground.cz> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/dg-chatgpt/ |
| مجوز | - |
# DevGround
## ChatGPT API wrapper
This is a wrapper for the [ChatGPT API](https://platform.openai.com/docs/introduction) by [DevGround](https://devground.cz/).
### Model
gpt-3.5-turbo
### License
It is licensed under the MIT license.
### Language
Written in Python 3.11
### Requirements
requires environment variables:
- OPENAI_API_KEY
### Installation
install the package with pip:
```bash
pip install dg_chatgpt_api
```
### Usage
```python
from dg_chatgpt_api import ChatGPTAPI as api
api.reconnect()
api.add_user("user_id", "username")
api.add_conversation("user_id")
message = {
"role": "user",
"content": "message"
}
response = api.get_response("user_id", message)
```
نیازمندی
| مقدار | نام |
|---|---|
| - | openai |
| - | python-dotenv |
| - | requests |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl dg-chatgpt-0.1.5:
pip install dg-chatgpt-0.1.5.whl
نصب پکیج tar.gz dg-chatgpt-0.1.5:
pip install dg-chatgpt-0.1.5.tar.gz