New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nonebot-plugin-bing-chat

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nonebot-plugin-bing-chat

基于nonebot2的bing-chat软件

  • 0.7.11
  • PyPI
  • Socket score

Maintainers
1
NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-bing-chat

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

license pypi PyPI - Downloads python

📖 介绍

一个可以使用新版Bing进行聊天的插件 (现在又不需要代理了)

目前支持go-cqhttponebot v11适配器和nonebot-plugin-guild-patch

QQ群:366731501

给个star🌟?

5月份有考试,暂时随缘更新

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

💿 安装与更新

使用 nb-cli 安装与更新
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-bing-chat --upgrade
使用pip安装与更新
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip install --upgrade nonebot-plugin-bing-chat 

对于发送图片的支持需要执行

pip install --upgrade nonebot-plugin-bing-chat[image]

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_bing_chat"]

⚙️ 配置

在 nonebot2 项目的./data/BingChat/cookies文件夹中添加cookies.json(必须)
  • 在浏览器安装 cookie-editor 的插件
  • 使用Edge浏览器打开www.bing.com/chat(需要魔法)
  • 打开 cookie-editor 插件
  • 点击右下角的 Export 按钮(这会把cookie保存到你的剪切板上)
  • 把你复制道德内容放到 cookies.json 文件里 How_to_export_cookies
  • (可选)你可以创建多个以.json结尾的cookies文件
在 nonebot2 项目的.env文件中添加下表中的配置(可选项)


在.env书写配置时,字符转要使用双引号,而不是单引号

命令配置

配置项类型默认值说明
command_startlist[str]["/"]命令前缀
bingchat_command_chatstr/list[str]["chat"]对话命令
bingchat_command_new_chatstr/list[str]["chat-new", "刷新对话"]新建对话命令
bingchat_command_history_chatstr/list[str]["chat-history"]返回历史对话命令
bingchat_blockboolFalse是否block
bingchat_priorityint1指令的优先级
bingchat_to_meboolFalse所有命令是否需要@bot
bingchat_share_chatboolFalse他人是否可以用过回复bot而进行对话

输出配置

配置项类型默认值说明
bingchat_display_is_waitingboolTrue是否显示“正在请求”
bingchat_display_in_forwardboolFalse是否以合并转发的消息形式发送消息
bingchat_display_content_typesstr/list[str]["text.num-max-conversation&answer&suggested-question"]输出的内容包括什么

进行配置

配置项类型默认值说明
bingchat_logboolTrue是否记录日志
bingchat_proxystrNone代理地址
bingchat_conversation_style"creative" / "balanced" / "precise""balanced"对话样式
bingchat_auto_switch_cookiesboolFalse账号上限后是否自动切换cookies
bingchat_auto_refresh_conversationboolTrue聊天上限后是否自动建立新的对话

屏蔽群聊配置

配置项类型默认值说明
bingchat_group_filter_mode"whitelist"/"blacklist""blacklist"对群聊屏蔽的模式
bingchat_group_filter_blacklistlist[int][]QQ群黑名单列表
bingchat_group_filter_whitelistlist[int][]QQ群白名单列表
bingchat_guild_filter_blacklistlist[dict][]QQ频道黑名单列表
bingchat_guild_filter_whitelistlist[dict][]QQ频道白名单列表

频道的配置格式:{"guild_id": "123456789", "channel_id": "123456789"}

源码内容可以在./nonebot_plugin_bing_chat/common/dataModel.py查看

举例配置与效果

还没写,可以来QQ群来问我

🎉 使用

指令表

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

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

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

🌸 致谢

Contributor

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc