Unoffical ChatGPT Api
Based on reverse engineering work done by the python community and quickly ported to nodejs for a project 😉
CAN USE EMAIL/PASSWORD TO GET SESSION TOKEN AUTOMAGICALLY 🚀
npm install better-chatgpt
- No moderation
- Programmable.
- Resume conversation
- Rewind/undo
- Email/password authentication
- Cookie based authentication
- Access Token authentication
- Progressive responses
- Multiple sessions
- Conversation history
- Token refresh
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
- Examples
- Documentation
- Proxies
- Logging
- Improve test conerage
- 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