Nothing Special   »   [go: up one dir, main page]

Skip to content

Reverse engineered API of Microsoft's Bing Chat in CLI mode

License

Notifications You must be signed in to change notification settings

0xmatt1/BingChat

 
 

Repository files navigation

Bing Bing

Bing Chat CLI

The reverse engineering the chat feature of the new version of Bing

npm version

English | 简体中文

Quick Start

npx bingchat-cli

CLI Usage

npx bingchat-cli -h
Usage: bingchat-cli [options]

        !reset Reset the conversation
        !exit Exit the program
        !options Set request options

Options:
  -f, --cookie-file  Cookie file path                                                          [default: cookie.json]
      --stream       Used stream mode                                                       [boolean] [default: true]
  -h, --help         Show help                                                                              [boolean]
  -v, --version      Show version number                                                                    [boolean]
      --options      Request options  [array] [default: deepleo,enable_debug_commands,disable_emoji_spoken_text,enablemm]
Examples:
  bingchat-cli -f cookie.json

Repo: https://github.com/vincenthou/BingChat
By: https://github.com/KeJunMao/edgegpt
License: MIT

Arguments:

  • --stream: Used stream mode, true will be used as default, you can use --no-stream to set false.
  • -f, --cookie-file: Cookie json file path, cookie.json will be used as default.
  • --options: Request options, "deepleo", "enable_debug_commands", "disable_emoji_spoken_text", "enablemm" will be used as default, you can find more options here

Module Usage

import { ChatBot, loadBingChatConfig } from "bingchat";
const config = await loadBingChatConfig();

const chatBot = new ChatBot(config);
await chatBot.create();

console.log(await chatBot.askAsync("hello!"));

Configuration

Configuration is loaded by unjs/c12 from cwd. You can use either bingchat.config.json, bingchat.config.{ts,js,mjs,cjs}, .BingChatrc.

See ./src/config.ts for available options and defaults.

💻 Development

  • Clone this repository
  • Enable Corepack using corepack enable (use npm i -g corepack for Node.js < 16.10)
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

License

Made with 💛

Published under MIT License.

Acknowledgement

About

Reverse engineered API of Microsoft's Bing Chat in CLI mode

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 92.6%
  • JavaScript 7.4%