Skip to main content

ChatGPT Plugin

The ChatGPT Plugin simplifies chatbot creation by reverse engineering OpenAI's ChatGPT project. To build your own LLM chatbot, all you need is an OpenAPI specification. LLM chatbots offer powerful features out of the box such as:

  • Responds and understand multiple languages
  • Able to generate responses by utilising past messages
  • Good understanding of user intentions
  • ...

Getting Started

pip install chatgpt-plugin

How does it work

The framework generates for you an JSON that contains:

  • The endpoint that needs to be called
  • The endpoint body & params that needs to be passed to fulfill the users wish
  • A response message for each documented case

For the case of an TODO app:

from chatgpt_plugin.plugin import ChatPlugin

with open("todo_openapi.json") as f:
    openapi_specs = f.read()

todo_plugin = ChatPlugin(openapi_specs=openapi_specs)
todo_plugin.chat(message="Add buying frozen pizza as an todo")

The plugin framework will generate following python object:

endpoint='/todos/' 
endpoint_params={} 
endpoint_body={'title': 'Buy frozen pizza', 'description': 'Remember to buy frozen pizza', 'completed': False} 
message=[MessageResponse(response_message='Todo created successfully', response_code=200), 
         MessageResponse(response_message='Validation Error', response_code=422)]

Examples

You can find more examples under the examples folder.

Tips and Tricks

Here are some recommendations to make full use of this framework.

  • Add a description to your query parameter to make the usage more clear
  • Make the language specific e.g. if your query parameter only accept English then specify it in the description
  • Add all possible responses. If your API can fail for a reason, document it.

Licenses

Apache License Version 2.0, see LICENSE

Metadata

Release files for chatgpt-plugin 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chatgpt-plugin 0.0.2
File Size Uploaded
chatgpt_plugin-0.0.2.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chatgpt-plugin 0.0.2
File Interpreter ABI Platform
chatgpt_plugin-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 15.9 kB

Release files / chatgpt_plugin-0.0.2.tar.gz

Download URL chatgpt_plugin-0.0.2.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b5b8f0e05ab0de8b3bbf8217c99994148e07c31f6ed23510420d8d7754e1229e
BLAKE2b-256 checksum
How to use checksums
ff692060da25830fd480ee1c6244e0c4c7343c422df860a7aaa844618e809b46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.8.16 Darwin/22.2.0

Release files / chatgpt_plugin-0.0.2-py3-none-any.whl

Download URL chatgpt_plugin-0.0.2-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4761a96a1982410c93aac204b7c6a8594659876f04441d1076082dd2203d756c
BLAKE2b-256 checksum
How to use checksums
297bb3f55285621347d254a0fa147feb3c1c2b374f13c755ba4a360db5d544c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.8.16 Darwin/22.2.0

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page