Thanks to visit codestin.com
Credit goes to github.com

Skip to content

daily-coding-problem/chatgpt-service

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT Service Java CI with Maven

Docker Linux Spring

chatgpt-service

ChatGPT Service is a modular service that exposes an API to interact with ChatGPT.

Table of Contents

Features

  • API Endpoints: Provides endpoints to send interact with ChatGPT.
  • Docker Support: Can be run in a Docker container.
  • Logging: Logs information to the console.
  • Testing: Includes unit tests for the service.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Docker and Docker Compose installed on your machine.
  • Java 22 or higher installed on your machine.
  • Maven installed on your machine.

Installation

Clone the Repository

git clone https://github.com/daily-coding-problem/chatgpt-service.git
cd chatgpt-service

Install Dependencies

mvn -ntp dependency:go-offline

Setup Docker

If you would like to use Docker, ensure Docker and Docker Compose are installed on your machine. If not, follow the installation guides for Docker and Docker Compose.

Build Docker Images

docker compose build chatgpt-service

Configuration

Environment Variables

Create a .env file in the project root with the content found in the .env.example file.

Usage

Start the service with Docker:

docker compose up -d chatgpt-service && docker compose logs -f chatgpt-service

Or without Docker:

mvn spring-boot:run

Running Tests

Run the tests with the following command:

mvn test -Dspring.profiles.active=test

Test the GitHub Actions via Docker

To test the GitHub Actions via Docker, execute the following:

docker compose down -v && docker compose up --build github-action-maven-test

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A modular service that exposes an API to interact with ChatGPT.

Resources

Stars

Watchers

Forks

Languages

  • Java 96.3%
  • Dockerfile 3.7%