niteshrawal12 / MyChatgptApp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MyChatgptApp

ChatGPT API Integration with Spring Boot and OpenAI

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.

Features

  • 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.

Getting Started

Follow these instructions to set up and run the application locally.

Prerequisites

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.

Installation

  1. 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

openai.api.key=your_api_key_here

Usages

curl "http://localhost:8080/bot/chat?prompt=Translate the following English text to French: 'Hello, world.'"

About


Languages

Language:Java 100.0%