EdgeGPTJs
EdgeGPTJs copied to clipboard
a Node.js package inspired by the Python version [EdgeGPT](https://github.com/acheong08/EdgeGPT) repository.
EdgeGPTJs
Welcome to EdgeGPTJs, a Node.js package inspired by the Python version EdgeGPT repository. This package allows you to reverse engineer the chat feature of the new version of Bing, making it easier than ever to leverage the power of Bing's chat capabilities within your own projects.
Table of Contents
- EdgeGPTJs
- Table of Contents
- Features
- Roadmap
- Requirements
- Checking access (Required)
- Getting authentication (Required)
- Prompt Tool Usage
- Library Usage
- Contributing
- License
Features
- Reverse engineer the chat feature of the new version of Bing
- Easy-to-use API with thorough documentation
- Highly customizable and extendable
Roadmap
- [x] CLI tools by demo
- [x] exportable api by npm package
- [ ] one-click remote deployment inspired by ChatGPT-Next-Web
- [ ] integrate it with ChatGPT-Next-Web
Requirements
- A Microsoft Account with early access to https://bing.com/chat (Required)
- Required in a supported country with New Bing (Chinese mainland VPN required)
Checking access (Required)
-
Install the latest version of Microsoft Edge
-
Alternatively, you can use any browser and set the user-agent to look like you're using Edge (e.g.,
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.51). You can do this easily with an extension like "User-Agent Switcher and Manager" for Chrome and Firefox. -
Open bing.com/chat
-
If you see a chat feature, you are good to go
Getting authentication (Required)
Prompt Tool Usage
use ENVIRONMENT_VARIABLE to pass cookie jar file.
export COOKIE_FILE=/path/to/cookie.json
npx edgegptjs
or use
npx edgegptjs --cookie-file=cookie.json
Library Usage
To get started with EdgeGPTJs, import the package and create a new instance of Chatbot:
const { Chatbot } = require('edgegptjs');
const bot = new Chatbot(args.cookiePath);
await bot.chatHubInitialization;
const response = await bot.ask("What's the result of 1+1?");
console.log(`Bot: ${response}`);
For a detailed explanation of the API and available methods, please refer to the documentation.
Contributing
We welcome contributions from the community. If you'd like to contribute to EdgeGPTJs, please read our contributing guidelines to get started.
License
EdgeGPTJs is released under the MIT License.