Skip to main content

基于nonebot2的bing-chat软件

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-bing-chat

✨ 一个可以使用新版Bing进行聊天的插件 ✨

license pypi PyPI - Downloads python

📖 介绍

一个可以使用新版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.json(必须)
  • 在浏览器安装 cookie-editor 的插件
  • 打开www.bing.com/chat(需要魔法)
  • 打开 cookie-editor 插件
  • 点击右下角的 Export 按钮(这会把cookie保存到你的剪切板上)
  • 把你复制道德内容放到 cookies.json 文件里
How_to_export_cookies
在 nonebot2 项目的`.env`文件中添加下表中的配置(都为可选项)

对默认的命令进行修改

配置项 类型 默认值 说明
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_command_to_me bool False 所有命令是否需要@bot
bingchat_share_chat bool False 他人是否可以用过回复bot而进行对话

对行为进行配置

配置项 类型 默认值 说明
bingchat_conversation_style Literal['creative', 'balanced', 'precise'] "balanced" 对话样式
bingchat_show_is_waiting bool False 是否显示“正在请求”
bingchat_auto_refresh_conversation bool True 到达命令上线后是否自动刷新
bingchat_log bool False 是否记录日志

对特定群聊进行屏蔽

配置项 类型 默认值 说明
bingchat_group_filter_mode "whitelist"/"blacklist" "blacklist" 对群聊屏蔽的模式
bingchat_group_filter_blacklist list[int] [] 黑名单列表
bingchat_group_filter_whitelist list[int] [] 白名单列表

🎉 使用

指令表

以下为指令可以在配置文件中更改

指令 权限 需要@ 范围 说明
chat 所有人 私聊/群聊 与Bing进行对话
chat-new 所有人 私聊/群聊 新建一个对话
chat-history 所有人 私聊/群聊 返回历史对话

你可以回复bot的消息从而直接继续对话,而不用输入对话指令

📄 ToDo

准备添加的功能请查看issue

如果你有更多需求,请发布新的issue让我知道

🌸 致谢

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot-plugin-bing-chat-0.6.0a1.tar.gz (23.6 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_bing_chat-0.6.0a1-py3-none-any.whl (23.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page