A python wrapper around OpenAI ChatGPT for easy access of its functionality
Project description
ChatGptPrtk
ChatGPT is a prototype artificial intelligence chatbot developed by OpenAI which specializes in dialogue.
ChatGptPrtk is a python wrapper around OpenAI ChatGPT for easy access of its functionality.
Features
- Programmable use as SDK
- Create server and run API with customizable payload
- No Moderation
- API Key based authentication
Installation
Install ChatGptPrtk with pip
pip install chatgptprtk
Usages
Create an account in OpenAI and get API Key
Get AI Response
import chatgptprtk as ch
api_key="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx83r"
ch.setApiKey(api_key)
msg="write a pallindrome program in java"
response=ch.sendMessage(msg)
Start a server
ch.startServer()
API Reference
Endpoint
{Host url}/getChatgptResponse
Request
Parameter | Type | Description |
---|---|---|
msg |
string |
Required. Your Message to AI |
Response
Parameter | Type | Description |
---|---|---|
chatGptResp |
string |
Response from chatGPT |
responseCode |
int |
API Response Code |
API Key
Set a valid API Key using setApiKey()
before starting server.
License
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
chatgptprtk-0.1.1.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for chatgptprtk-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08b4eddc860c4ac44223816688acedd59d57510b0e30ecfe4a44c0f7038ca39f |
|
MD5 | 115c115030deb0d6d8b2bafeb932794d |
|
BLAKE2b-256 | 6e5e22cb8a92adbf2cdfdde9d0ebf1f9ecf6f8c18aca5a88cdcb73184c5dfd0d |