Wrapper for OpenAI API, intended to be used for a discord bot powered by chatGPT.
Project description
DevGround
ChatGPT API wrapper
This is a wrapper for the ChatGPT API by DevGround.
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:
pip install dg_chatgpt_api
Usage
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dg_chatgpt-0.1.5.tar.gz
(4.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dg_chatgpt-0.1.5.tar.gz.
File metadata
- Download URL: dg_chatgpt-0.1.5.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
becee58b8c6f93c19dd977efc5226391ba83f402e1df1492f0d95743ce90e7aa
|
|
| MD5 |
28e0f735543b692a4b1018d6e7e4c6dc
|
|
| BLAKE2b-256 |
e9435157c677a9554067d06ae4603bc31f8eccb57053d27b796620034c1b1dfa
|
File details
Details for the file dg_chatgpt-0.1.5-py3-none-any.whl.
File metadata
- Download URL: dg_chatgpt-0.1.5-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
396e71cdd24dbe08a4c373e311f8226399065ef4a6d3c30d2ca4e4b7d015e138
|
|
| MD5 |
caf0bc792d2ca3127d9d7a37d166f3e9
|
|
| BLAKE2b-256 |
e08d020f787fc46dfc04721af6f7e994669104ed6d454692fe328715cebf3550
|