Giter VIP home page Giter VIP logo

chatapi's Introduction

Welcome to chatapi ๐Ÿ‘‹

Version License: MIT Twitter: fuergaosi

Chatgpt non-official API Server

This project is still in its very early stages and there may be many problems. I will try to update it as soon as possible.

Install

npm install

Usage

Config

  1. Copy env.example to .env. CAPTCHA_TOKEN is required

    cp env.example .env
  2. Create account.json

    [
        {    
            "email": "username",
            "password": "password"
        }
    ]
  3. Start database

    docker-compose -f docker-compose.db.yml up -d
  4. Seed Database

    npm run seed
  5. Start server

    npm run start
  6. Test API

    • Get bot status
        curl "http://localhost:3000/chatgpt/account"
    • Send message
        curl -X "POST" "http://localhost:3000/chatgpt/sendMessage" \
              -H 'Content-Type: application/json; charset=utf-8' \
              -d $'{
          "message": "Hey!"
        }'
    
    • Send Message with user id

    You can use userId to send message with conversation

      curl -X "POST" "http://localhost:3000/chatgpt/sendMessage" \
            -H 'userId: holegots' \
            -H 'Content-Type: application/json; charset=utf-8' \
            -d $'{
        "message": "Hey!"
      }'
    

Run tests

npm run test

Author

๐Ÿ‘ค Holegots

Show your support

Give a โญ๏ธ if this project helped you!

chatapi's People

Contributors

fuergaosi233 avatar means88 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.