acheong08/EdgeGPT
Fork: 354 Star: 3835 (更新于 2023-03-20 05:07:33)
license: Unlicense , Language: Python.
Reverse engineered API of Microsoft's Bing Chat
最后发布版本: 0.0.60 (2023-03-17 18:56:02)

Edge GPT
The reverse engineering the chat feature of the new version of Bing
Table of Contents
Setup
Install package
python3 -m pip install EdgeGPT --upgrade
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)
Usage
Quick start
$ python3 -m EdgeGPT -h
EdgeGPT - A demo of reverse engineering the Bing GPT chatbot
Repo: github.com/acheong08/EdgeGPT
By: Antonio Cheong
!help for help
Type !exit to exit
Enter twice to send message or set --enter-once to send one line message
usage: EdgeGPT.py [-h] [--enter-once] [--no-stream] [--style {creative,balanced,precise}] --cookie-file COOKIE_FILE
options:
-h, --help show this help message and exit
--enter-once
--no-stream
--style {creative,balanced,precise}
--cookie-file COOKIE_FILE
Developer demo
Three ways to pass in cookies:
-
Environment variable:
export COOKIE_FILE=/path/to/cookies.json
. -
Specify the path to
cookies.json
in the argumentcookiePath
like this:bot = Chatbot(cookiePath='./cookie.json')
-
Pass in the cookies directly by the argument
cookies
, like this:with open('./cookie.json', 'r') as f: cookies = json.load(f) bot = Chatbot(cookies=cookies)
Use Async for the best experience
Reference code for more advanced example of usage:
import asyncio
from EdgeGPT import Chatbot, ConversationStyle
async def main():
bot = Chatbot()
print(await bot.ask(prompt="Hello world", conversation_style=ConversationStyle.creative))
await bot.close()
if __name__ == "__main__":
asyncio.run(main())
Work in progress
- Error handling
Star History
Contributors
This project exists thanks to all the people who contribute.

最近版本更新:(数据更新于2023-03-19 10:57:18)
2023-03-17 18:56:02 0.0.60
2023-03-17 18:22:52 0.0.59
2023-03-17 13:43:50 0.0.58.2
2023-03-16 15:02:07 0.0.57.1
2023-03-16 07:48:17 0.0.57
2023-03-15 08:46:19 0.0.56.2
2023-03-13 18:29:41 0.0.56.1
2023-03-13 17:55:47 0.0.56
2023-03-05 10:55:55 0.0.55
2023-03-04 20:58:31 0.0.54
主题(topics):
binggpt, chatgpt, edge, edgegpt, gpt, reverse-engineering
acheong08/EdgeGPT同语言Python最近更新仓库
2023-03-20 20:09:07 34j/so-vits-svc-fork
2023-03-20 17:49:50 NAStool/nas-tools
2023-03-19 01:04:31 sqlalchemy/sqlalchemy
2023-03-17 10:29:20 notepad-plus-plus/nppPluginList
2023-03-17 09:56:24 modelscope/modelscope
2023-03-17 03:58:33 home-assistant/core