cookeem ff2410ebea v1.0.3
2023-03-22 23:05:24 +08:00
2023-02-10 13:03:52 +08:00
2023-03-22 23:04:05 +08:00
2023-03-22 16:18:38 +08:00
2023-02-15 11:01:18 +08:00
2023-02-10 13:03:52 +08:00
2023-03-22 16:18:38 +08:00
2023-03-22 23:05:24 +08:00
2023-03-22 23:05:24 +08:00
2023-03-22 11:22:06 +08:00
2023-02-10 14:22:29 +08:00
2023-03-22 23:04:05 +08:00
2023-02-10 13:03:52 +08:00
2023-03-22 16:36:47 +08:00
2023-03-22 16:50:53 +08:00

Real-time ChatGPT service, support GPT3/GPT4

About chatgpt-service and chatgpt-stream

gitee

Demo

Quick start

# Pull source code
git clone https://github.com/cookeem/chatgpt-service.git
cd chatgpt-service

# ChatGPT's registration page: https://beta.openai.com/signup
# ChatGPT registration tutorial: https://www.cnblogs.com/damugua/p/16969508.html
# ChatGPT API key management page: https://beta.openai.com/account/api-keys

# Modify the config.yaml configuration file, modify the apiKey, and change it to your openai.com API key
vi config.yaml
#  your openai.com API key
apiKey: "xxxxxx"


# Start the service with docker-compose
docker-compose up -d

# Check service status
docker-compose ps   
     Name                    Command               State                  Ports                
-----------------------------------------------------------------------------------------------
chatgpt-service   /chatgpt-service/chatgpt-s ...   Up      0.0.0.0:59142->9000/tcp             
chatgpt-stream    /docker-entrypoint.sh ngin ...   Up      0.0.0.0:3000->80/tcp,:::3000->80/tcp


# To access the page, please ensure that your server can access the chatGPT API
# http://localhost:3000

How to build

# Pull build dependencies
go mod tidy
# Compile the project
go build

# Run the service
./chatgpt-service

# API url
# ws://localhost:9000/api/ws/chat

# Install wscat
npm install -g wscat

# Use wscat to test websocket, then enter the question you want to query
wscat --connect ws://localhost:9000/api/ws/chat

Description
Real-time ChatGPT service, support GPT3/GPT4, support conversation and generate pictures from sentences, this is backend
Readme 1.9 MiB
Languages
Go 98.3%
Dockerfile 1.7%