Skip to content

CherryNo1/ChatgptForJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Please read this document patiently.

English | 简体中文

Introduction of Dependencies

<dependency>
    <groupId>io.github.cherryNo1</groupId>
    <artifactId>chatGptForJava</artifactId>
    <version>1.0.0</version>
</dependency>

Please configure your API_KEY, API endpoint, and the model you will be using in the YAML configuration file. Currently, GPT4 is not supported.

If you are debugging in China, please configure openai.proxy.

openai:
  key: your api key
  url: https://api.openai.com/v1/chat/completions
  model: gpt_3_5_turbo
#  enableProxy: true
#  proxy:
#    proxy-host: 127.0.0.1
#    proxy-port: 7890
#    type: http

Isolating Sessions and Connecting Contextual Conversations

Please carefully read the code in the demo. You will need to use a database or Redis to store the conversation between the user and ChatGpt.

About

ChatGPT api for java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages