Skip to main content

Wrapper for OpenAI API, intended to be used for a discord bot powered by GPT-4.

Project description

DevGround

ChatGPT API wrapper

This is a wrapper for the OpenAI's GPT-4 API by DevGround.

Model

The AI model used in this package is GPT-4

License

This package is licensed under the MIT license.

Language

The language used in this package is Python.

Requirements

requires environment variables:

  • OPENAI_API_KEY

Installation

Package will be available on PyPI soon.

--install the package with pip:--

pip install gpt4api_dg

Usage

Usage sample is copied from earlier gpt-3.5-turbo project and is subject to change. It is not yet tested with gpt-4.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpt4api_dg-0.0.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gpt4api_dg-0.0.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file gpt4api_dg-0.0.1.tar.gz.

File metadata

  • Download URL: gpt4api_dg-0.0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for gpt4api_dg-0.0.1.tar.gz
Algorithm Hash digest
SHA256 af71e5756be3dfff396b86c0d05e2f9f36138aa47b78bc1403e3105d5c9554cc
MD5 917c833a0af94e254625b2aae344deeb
BLAKE2b-256 1e6b8983215ddd62c67e5593a296f7eb6d63c726ce802ed1138662859c7748fb

See more details on using hashes here.

File details

Details for the file gpt4api_dg-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gpt4api_dg-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for gpt4api_dg-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7e5fcd5c21b7f28a3a123c1c5f41d68be13cc381c58b6e2ded047389b54e477e
MD5 dd5ac12ae3f6058f59976f46b7e6edc2
BLAKE2b-256 9fe713317bf5a9fb38354ab50608ac3beeff7c97246f68e2f3789ab2fb4ff7ed

See more details on using hashes here.

Supported by

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