基于nonebot2的bing-chat软件
Project description
📖 介绍
一个可以使用新版Bing进行聊天的插件
QQ群:366731501
能否给孩子一个star🌟吗
目前仅支持onebot v11
5月份孩子有重要的考试,暂时随缘更新
如果你有更多需求,请发布issue让我知道
💿 安装与更新
使用 nb-cli 安装与更新
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-bing-chat --upgrade
使用包管理器安装与更新
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip install nonebot-plugin-bing-chat --upgrade
打开 nonebot2 项目根目录下的 pyproject.toml
文件, 在 [tool.nonebot]
部分追加写入
plugins = ["nonebot_plugin_bing_chat"]
⚙️ 配置
目前不能不使用代理进行访问,需要配置代理
在 nonebot2 项目的./data/BingChat/cookies
文件夹中添加cookies.json
(必须)
- 在浏览器安装
cookie-editor
的插件- Chrome/Edge(需要魔法)
- Firefox
- 打开
www.bing.com/chat
(需要魔法) - 打开
cookie-editor
插件 - 点击右下角的
Export
按钮(这会把cookie保存到你的剪切板上) - 把你复制道德内容放到
cookies.json
文件里
在 nonebot2 项目的.env
文件中添加下表中的配置(可选项)
在.env书写配置时,字符转要使用双引号,而不是单引号
命令配置
配置项 | 类型 | 默认值 | 说明 |
---|---|---|---|
command_start | list[str] | ["/"] | 命令前缀 |
bingchat_command_chat | str/list[str] | ["chat"] | 对话命令 |
bingchat_command_new_chat | str/list[str] | ["chat-new", "刷新对话"] | 新建对话命令 |
bingchat_command_history_chat | str/list[str] | ["chat-history"] | 返回历史对话命令 |
bingchat_block | bool | False | 是否block |
bingchat_priority | int | 1 | 指令的优先级 |
bingchat_to_me | bool | False | 所有命令是否需要@bot |
bingchat_share_chat | bool | False | 他人是否可以用过回复bot而进行对话 |
输出配置
配置项 | 类型 | 默认值 | 说明 |
---|---|---|---|
bingchat_display_is_waiting | bool | True | 是否显示“正在请求” |
bingchat_display_in_forward | bool | False | 是否以合并转发的消息形式发送消息 |
bingchat_display_content_types | str/list[str] | ['text.answer'] | 输出的内容包括什么 |
进行配置
配置项 | 类型 | 默认值 | 说明 |
---|---|---|---|
bingchat_log | bool | True | 是否记录日志 |
bingchat_proxy | str | None | 代理地址 |
bingchat_conversation_style | "creative" / "balanced" / "precise" | "balanced" | 对话样式 |
bingchat_auto_switch_cookies | bool | False | 账号上限后是否自动切换cookies |
bingchat_auto_refresh_conversation | bool | True | 聊天上限后是否自动建立新的对话 |
屏蔽群聊配置
配置项 | 类型 | 默认值 | 说明 |
---|---|---|---|
bingchat_group_filter_mode | "whitelist"/"blacklist" | "blacklist" | 对群聊屏蔽的模式 |
bingchat_group_filter_blacklist | list[int] | [] | 黑名单列表 |
bingchat_group_filter_whitelist | list[int] | [] | 白名单列表 |
举例配置与效果
还没写,可以来QQ群来问我
🎉 使用
指令表
以下为指令可以在配置文件中更改
指令 | 权限 | 需要@ | 范围 | 说明 |
---|---|---|---|---|
chat | 所有人 | 否 | 私聊/群聊 | 与Bing进行对话 |
chat-new | 所有人 | 否 | 私聊/群聊 | 新建一个对话 |
chat-history | 所有人 | 否 | 私聊/群聊 | 返回历史对话 |
你可以回复bot的消息从而直接继续对话,而不用输入对话指令
🌸 致谢
- @A-kirami 项目使用了README模板
- @acheong08 项目使用了与Bing通讯的接口 EdgeGPT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for nonebot_plugin_bing_chat-0.7.0a5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28cd02d5b3bb67a3c9889a43c0d93fd733bc3d0802218aafcd56f773714a23f4 |
|
MD5 | 0ea0c3fd851f6521ca6f17e82d74404d |
|
BLAKE2b-256 | e6a7297b942528e1c0f4d9faf184d77c6683a417c21828e9003787307511ba18 |
Close
Hashes for nonebot_plugin_bing_chat-0.7.0a5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | beaf09a20d613c29a8346132d2be665e7a1e295138139a9e609b6f23deb78d30 |
|
MD5 | 134d5cbf576802c11bfe206e2d1cee8a |
|
BLAKE2b-256 | 6e5a14f7b95754405024f77ce48efc6554afb263f43d82f15acfa91648a8cc6f |