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.4.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for dg_chatgpt-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 541bd20623e9147ead19ea26dc502271c9e3816705a3345be2375510842048dd |
|
MD5 | 3b4c4f7a71c0af2ba5a9614a0ffb3d8a |
|
BLAKE2b-256 | 3cf17b67e98c46508a2bc52d182098832cec50ea00b14d38d3bcb388a85f8032 |