Coder Social home page Coder Social logo

multi-flex-chatgpt's Introduction

multi-flex-chatgpt

⭕️ Spring Boot 기반의 ChatGPT Open API 활용 프로젝트 

⭕️ 가이드 링크



1. 개발환경

dacdc261-8c0c-4aa0-9377-718f2d9eda0a

환경 분류 버전
JDK Java 17
spring-boot 3.2.1
spring-boot-starter-web 3.2.1
Lombok -



2. 사용방법

  1. src/main/resources/config 패키지가 없다면 구성하며, 해당위치에 application-xxx-local.yml 형태의 파일을 생성합니다.

  2. 아래와 OpenAI에서 발급받은 키 값을 넣어줍니다.

openai:
secret-key:xxxxx
  1. application.properties 파일 내에 해당 yml 파일을 참조합니다.
spring.profiles.active=multiflex-xxx



3. API Endpoint

End point HTTP METHOD 설명
http://localhost:8000//api/v1/chatGpt/modelList GET 사용 가능한 모델리스트를 조회합니다
http://localhost:8000//api/v1/chatGpt/model GET 유효한 모델인지 확인합니다.
http://localhost:8000//api/v1/chatGpt/legacyPrompt POST 레거시 모델(gpt-3.5-turbo-instruct, babbage-002, davinci-002)을 사용하여 프롬프트를 입력하고 결과값을 받습니다.
http://localhost:8000//api/v1/chatGpt/prompt POST 새로운 모델(gpt-4, gpt-4 turbo, gpt-3.5-turbo)을 사용하여 프롬프트를 입력하여 결과값을 받습니다.
⭕️ Request Format

1. 모델 리스트 조회

다운로드


2. 유효한 모델 조회

다운로드 (1)


3. 레거시 모델(gpt-3.5-turbo-instruct, babbage-002, davinci-002) 조회

다운로드 (2)


4. 새로운 모델(gpt-4, gpt-4 turbo, gpt-3.5-turbo) 조회

다운로드 (3)

4. Versions

v0.0.2

  • Legacy Model과 Newer Model API 분리 작업 완료
  • Open AI Endpoint properties 파일로 분리 작업 완료

v0.0.1

  • 초기 개발환경 구축
  • RestTemplate을 이용한 간단한 API 통신 방법 구성
  • Legacy Model 통신만을 위한 Controller 및 로직 구성

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.