Build Real-Time ChatGPT Apps with chatGPT-service & chatGPT-stream: Quick Start Guide

This article introduces the open‑source chatGPT-service backend and chatGPT-stream frontend, explains their WebSocket integration, provides Gitee mirrors, and offers step‑by‑step commands for cloning, configuring, Docker deployment, compilation, and testing the real‑time ChatGPT application.

Programmer DD
Programmer DD
Programmer DD
Build Real-Time ChatGPT Apps with chatGPT-service & chatGPT-stream: Quick Start Guide

chatGPT-service and chatGPT-stream

chatGPT-service: https://github.com/cookeem/chatgpt-service – a backend service that receives ChatGPT messages in real time and forwards them via WebSocket to chatGPT‑stream.

chatGPT-stream: https://github.com/cookeem/chatgpt-stream – a frontend service that receives messages from chatGPT‑service through WebSocket.

Gitee mirrors

https://gitee.com/cookeem/chatgpt-service

https://gitee.com/cookeem/chatgpt-stream

Quick start

# Clone repository
git clone https://github.com/chatgpt-service.git
cd chatgpt-service

# Register ChatGPT and obtain API key
# https://beta.openai.com/signup
# https://www.cnblogs.com/damugua/p/16969508.html
# https://beta.openai.com/account/api-keys

# Edit config.yaml and set your OpenAI appKey
vi config.yaml
appKey: "xxxxxx"

# Start services with Docker
docker-compose ps
# ... (output omitted)

# Access the frontend at http://localhost:3000

How to compile

# Install dependencies
go mod tidy
# Build the project
go build
# Run the binary
./chatgpt-service

# Test WebSocket endpoint
# ws://localhost:9000/api/ws/chat

# Install wscat
npm install -g wscat
# Connect and send queries
wscat --connect ws://localhost:9000/api/ws/chat

Sample article generated by ChatGPT‑Stream

# Write a 1000‑word introduction of an open‑source app named chat‑stream that uses the ChatGPT API, backend in Go, frontend in Vue, and WebSocket for real‑time messages.

Chat‑Stream is an open‑source chatbot built on the ChatGPT API, with a Go backend, Vue frontend, and WebSocket for real‑time message delivery. It supports multi‑language chat, voice recognition, history storage, and integration with social platforms such as Weibo and WeChat.
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

BackendGoChatGPTVueWebSocketOpen-source
Programmer DD
Written by

Programmer DD

A tinkering programmer and author of "Spring Cloud Microservices in Action"

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.