https://github.com/boburmirzo/apisix-java-chatgpt-openaiapi
Read the full tutorial
https://github.com/boburmirzo/apisix-java-chatgpt-openaiapi
api-gateway apisix chatgpt docker java spring-boot
Last synced: 2 months ago
JSON representation
Read the full tutorial
- Host: GitHub
- URL: https://github.com/boburmirzo/apisix-java-chatgpt-openaiapi
- Owner: Boburmirzo
- Created: 2023-06-10T09:01:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-19T10:06:53.000Z (over 2 years ago)
- Last Synced: 2025-05-13T18:49:25.936Z (5 months ago)
- Topics: api-gateway, apisix, chatgpt, docker, java, spring-boot
- Language: Java
- Homepage: https://api7.ai/blog/managing-ai-powered-java-apps
- Size: 22.5 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Managing AI-powered Java App with API Management
This repo demonstrates how to use OpenAI ChatGPT APIs in Spring Boot, secure and manage the traffic
with Apache APISIX.### Prerequisites
Before we start, make sure you have the following:
- Create anΒ [OpenAI API Key](https://platform.openai.com/docs/api-reference/authentication): 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](https://www.docker.com/products/docker-desktop/)Β is installed on your machine to run APISIX and Spring Boot.### How to set up the project
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](https://github.com/Boburmirzo/apisix-java-chatgpt-openaiapi/blob/main/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](https://apisix.apache.org/docs/apisix/2.15/stand-alone/). There are other APISIX [installation options](https://apisix.apache.org/docs/apisix/installation-guide/) and [deployment modes](https://apisix.apache.org/docs/apisix/deployment-modes/) as well. Now APISIX as a separate service is running on `localhost:9080` and Spring Boot app on `localhost:8080`.
### Community
- π [Join the Apache APISIX Community](https://apisix.apache.org/docs/general/join/)
- π¦ [Follow us on Twitter](https://twitter.com/ApacheAPISIX)
- π [Find us on Slack](https://join.slack.com/t/the-asf/shared_invite/zt-vlfbf7ch-HkbNHiU_uDlcH_RvaHv9gQ)
- π [How to contribute page](https://apisix.apache.org/docs/general/how-to-contribute/)### About the author
- Visit my blog: [www.iambobur.com](https://www.iambobur.com/)
- Ask questions: [on Slack](https://join.slack.com/t/the-asf/shared_invite/zt-vlfbf7ch-HkbNHiU_uDlcH_RvaHv9gQ)