tchatgpt
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

ChatGPT

Reverse Engineered ChatGPT by OpenAI. Extensible for chatbots etc.

Disclaimer

This is not an official OpenAI product. This is a personal project and is not affiliated with OpenAI in any way. Don't sue me

Features

image

  • No moderation
  • Programmable

Setup

Install

npm install tchatgpt

Get your session token

Go to https://chat.openai.com/chat and log in or sign up

  1. Open console with F12
  2. Open Application tab > Cookies image
  3. Copy the value for __Secure-next-auth.session-token and paste it into config.json.example under session_token. You do not need to fill out Authorization

Running

const { Chatbot } = require('tchatgpt');
const config = require('./config.json');
const chatbot = new Chatbot(config);
chatbot.refresh_session().then(() => {
    chatbot.get_chat_response('Hello').then(console.log);
});

Make sure you run refresh_session if you are only using the session_token.

Refresh every so often in case the token expires.

Readme

Keywords

none

Package Sidebar

Install

npm i tchatgpt

Weekly Downloads

1

Version

1.0.1

License

GPL-3.0

Unpacked Size

23.8 kB

Total Files

5

Last publish

Collaborators

  • suzuneu