Skip to content

jcbdev/better-chatgpt

Repository files navigation

better-chatgpt

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 🚀


Install

npm install better-chatgpt

Features

  • No moderation
  • Programmable.
  • Resume conversation
  • Rewind/undo
  • Email/password authentication
  • Cookie based authentication
  • Access Token authentication
  • Progressive responses
  • Multiple sessions
  • Conversation history
  • Token refresh

Usage

Login via email and password

import { ChatGPT } from 'better-chatgpt';

const chat = new ChatGPT();
await chat.login('some@email.com', '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

About

Unofficial Api for the yet to be release chatgpt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published