Git Product home page Git Product logo

chatgpt-service's Introduction

Real-time ChatGPT service, based on the latest gpt-3.5-turbo-0301 model

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 appKey, and change it to your openai.com API key
vi config.yaml
#  your openai.com API key
appKey: "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

chatgpt-service's People

Contributors

cookeem avatar

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.