Skip to content

baronrustamov/ChatGPT-API-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT API Server

Quickstart

Setup

  1. Install Go
  2. go install github.com/ChatGPT-Hackers/ChatGPT-API-server@latest

Build

  1. git clone https://github.com/ChatGPT-Hackers/ChatGPT-API-server/
  2. cd ChatGPT-API-server
  3. go install .

Usage

ChatGPT-API-server <port> <SECRET_KEY>

The secret key can be anything you want. It's just for authenticating your users

Connect agents

Take note of your IP address or domain name. This could be localhost or a remote IP address. The default port is 8080

Check out our firefox agent. More versions in the works.

Usage

 $ curl "http://localhost:8080/api/ask" -X POST --header 'Authorization: <SECRET_KEY>' -d '{"content": "Hello world", "conversation_id": "<optional>", "parent_id": "<optional>"}'

Docker

open docker-compose.yml and add your own custom api-key in <api-key> section

version: "3"

services:
 chatgpt-api-server:
   build: .
   ports:
     - "8080:8080"
   command: ["ChatGPT-API-server", "8080", "<api-key>"]

then run:

docker-compose up or docker-compose up -d (if you want a persistent instance)

About

API server for ChatGPT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 96.7%
  • Dockerfile 3.3%