Skip to content

Boburmirzo/apisix-chatgpt-gateway-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Gateway between ChatGPT custom plugin and backend APIs

API Gateway can be helpful for ChatGPT plugin developers to expose, secure, manage, and monitor their API endpoints. This repo demonstrates how to use Apache APISIX API Gateway as a front door for communication between ChatGPT custom plugins and backend APIs.

How does it work?

As an example, in the ChatGPT user interface, if a user wants to obtain details about a speaker's sessions and topics using either the speaker's unique ID or name, the plugin is capable of establishing a connection with the plugin service. It then forwards the user's request to the API Gateway, which retrieves the necessary information from various API endpoints and consolidates the response into a unified context. See sample output below:

API Gateway for ChatGPT Plugins

Assume that now you want to secure the Conference API, without API Gateway in place you can still secure the data exchange between ChatGPT UI and plugin by using Plugin Authentication methods from OpenAI. However, the communication between the plugin and your backend service still remains unsecured until you implement some cross-cutting concerns in Python code, instead of spending time on this: - We can implement security measures like authentication, authorization, and rate limiting with the API Gateway to protect the Conference API from unauthorized access and potential attacks. ChatGPT can talk to API Gateway freely but the communication between API Gateway and backend service can be absolutely secure.

How to run it?

Prerequisites

To start the project run simply the following command from the project root directory:

docker compose up

Community

🙋 Join the Apache APISIX Community

🐦 Follow us on Twitter

📝 Find us on Slack

💁 How to contribute page

About the author

Follow me on Twitter: @BoburUmurzokov

Visit my blog: www.iambobur.com

About

ChatGPT custom plugin for APISIX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published