chatgpt-client-0.2.0
توضیحات
Python client for the unofficial ChatGPT API.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | chatgpt-client-0.2.0 |
| نام | chatgpt-client |
| نسخه کتابخانه | 0.2.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | vsakkas |
| ایمیل نویسنده | vasileios.sakkas96@gmail.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/chatgpt-client/ |
| مجوز | MIT |
# ChatGPT Client
[](https://github.com/vsakkas/chatgpt-client/releases/tag/0.1.0)
[](https://www.python.org/downloads/)
[](https://github.com/vsakkas/chatgpt-client/blob/master/LICENSE)
[](https://github.com/vsakkas/chatgpt-client/actions/workflows/main.yml)
Python client for the unofficial [ChatGPT](https://openai.com/blog/chatgpt/) API by [OpenAI](https://openai.com/).
## Installation
To install the ChatGPT Client, run the following command:
```bash
pip install chatgpt-client
```
## Usage
Sign up for an [OpenAI API key](https://platform.openai.com/overview) and store it in your environment.
```python
import asyncio
import os
from chatgpt_client import ChatGPTClient
async def main() -> None:
api_key = os.getenv("OPENAI_API_KEY")
client = ChatGPTClient(api_key)
response = await client.get_completion("What is the meaning of life?")
print(response["choices"][0]["text"])
if __name__ == "__main__":
asyncio.run(main())
```
## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/vsakkas/chatgpt-client/blob/master/LICENSE) file for details.
نیازمندی
| مقدار | نام |
|---|---|
| >=3.8.3,<4.0.0 | aiohttp |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10,<4.0 | Python |
نحوه نصب
نصب پکیج whl chatgpt-client-0.2.0:
pip install chatgpt-client-0.2.0.whl
نصب پکیج tar.gz chatgpt-client-0.2.0:
pip install chatgpt-client-0.2.0.tar.gz