This repo demonstrates how to use OpenAI ChatGPT APIs in Spring Boot, secure and manage the traffic with Apache APISIX.
Before we start, make sure you have the following:
- Create anΒ OpenAI API Key: To access the OpenAI API, you will need to create an API Key. You can do this by logging into the OpenAI website and navigating to the API Key management page.
- DockerΒ is installed on your machine to run APISIX and Spring Boot.
To set up the project, we can simply run docker compose up
command. Because we have already defined all necessary services in docker-compose.yml. This file defines only 2 containers one for APISIX, and another for the Spring boot application. In this sample project, we run APISIX in standalone mode. There are other APISIX installation options and deployment modes as well. Now APISIX as a separate service is running on localhost:9080
and Spring Boot app on localhost:8080
.
- π Join the Apache APISIX Community
- π¦ Follow us on Twitter
- π Find us on Slack
- π How to contribute page
- Visit my blog: www.iambobur.com
- Ask questions: on Slack