better-chatgpt
v1.0.3
Published
A better chatgpt unnofficial api
Downloads
7
Readme
better-chatgpt
Unoffical ChatGPT Api
Based on reverse engineering work done by the python community and quickly ported to nodejs for a project 😉
Install
npm install better-chatgpt
Functionality
- No moderation
- Programmable.
- Resume conversation
- Rewind/undo
- Email/password authentication
- Cookie based authentication
- Access Token authentication
Usage
Login via email and password
import { ChatGPT } from 'better-chatgpt';
const chat = new ChatGPT();
await chat.login('[email protected]', 'mypassword');
let response = await chat.getNextResponse('Hello, how are you?');
console.log(response);
response = await chat.getNextResponse('');
Use existing session/auth token
import { ChatGPT } from 'better-chatgpt';
const chat = new ChatGPT({
Authorization: '<token>',
sessionToken: '<token>'.
});
revert last response
chat.rollback()
WIP - More info to be added
TODO
- Examples
- Documentation
- Proxies
- Logging
- Improve test conerage
Credits
- acheong08 - Original python implementation that inspired this
- rawandahmad698 - Reverse engineering Auth0
- FlorianREGAZ - TLS client
- PyRo1121 - Linting
- Harry-Jing - Async support
- Ukenn2112 - Documentation
- All other contributors