This repository contains a Spring Boot application that integrates with the OpenAI ChatGPT API. With this application, you can send prompts to ChatGPT and receive responses.
- Send prompts to the ChatGPT API and receive text-based responses.
- Integration with Spring Boot for easy deployment and customization.
- Error handling and best practices for API integration.
Follow these instructions to set up and run the application locally.
Before you begin, make sure you have the following:
- Java Development Kit (JDK) 11 or later installed.
- An OpenAI API key. Sign up for OpenAI and obtain your API key here.
-
Clone this repository to your local machine:
git clone https://github.com/your-username/chatgpt-spring-boot.git cd chatgpt-spring-boot
openai.api.key=your_api_key_here
curl "http://localhost:8080/bot/chat?prompt=Translate the following English text to French: 'Hello, world.'"