Skip to content

A simple server written in NodeJS that uses Playwright to interact with ChatGPT

Notifications You must be signed in to change notification settings

franciscohanna92/chatgpt-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT Server for Node.js

This is a NodeJS server for ChatGPT. It uses Playwright to send and get messages.

Installation

npm install

Usage

npm start

A Chromium browser will open with the ChatGPT home page. Login with your OpenAI account. Then, return to the temrinal and press Enter. The server will start on port 5001.

Make a request:

curl http://localhost:5001/api/chat?prompt=Hello

Response is text/html. For example:

<p>
  Hi there! Is there something you need help with? I'm a large language model
  trained by OpenAI, and I can assist you with a wide range of topics. Let me
  know if you have any questions or need any information. I'll do my best to
  help!
</p>

Demo client implementation

Visit http://localhost:5001 on your browser for a demo client implementation (index.html)

Enjoy!

About

A simple server written in NodeJS that uses Playwright to interact with ChatGPT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published