n0madic / BingChatBot

Bing chat Telegram bot implemented in Python that utilizes unofficial EdgeChat API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

Bing chat Telegram bot implemented in Python that utilizes unofficial EdgeChat API

Known issues

  • Different people will use the same conversation

Screenshot

Setup

Requirements

  • python 3.8+

  • A Microsoft Account with early access to http://bing.com/chat (Required)

    Checking access (Required)

  • Install the latest version of Microsoft Edge

  • Open http://bing.com/chat

  • If you see a chat feature, you are good to go

Getting authentication (Required)

  • Install the cookie editor extension for Chrome or Firefox
  • Go to bing.com
  • Open the extension
  • Click "Export" on the bottom right (This saves your cookies to clipboard)
  • Paste your cookies into a file cookies.json. The format of json refers to cookie.exaple.json(The middle field is omitted)

Install requirements

pip install -r requirements.txt

Replace config

Edit bing.py

vim bing.py

Find the configuration and edit it

#Please replace this config
BOT_TOKEN = 'REPLACE YOUR BOT TOKEN'
ALLOWED_USER_IDS = ['XXXXXXXXX', 'XXXXXXXX', 'XXXXXXXX']

Run

python bing.py

About

Bing chat Telegram bot implemented in Python that utilizes unofficial EdgeChat API

License:Apache License 2.0


Languages

Language:Python 100.0%