tchatgpt
v1.0.1
Published
ChatGPT Wrapper
Downloads
15
Readme
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
- 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
- Open console with
F12
- Open
Application
tab > Cookies - Copy the value for
__Secure-next-auth.session-token
and paste it intoconfig.json.example
undersession_token
. You do not need to fill outAuthorization
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.