Skip to main content

A python wrapper around OpenAI ChatGPT for easy access of its functionality

Project description

ChatGptPrtk

PyPi License

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

MIT

Project details


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.3.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

chatgptprtk-0.1.3-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page