Giter Site home page Giter Site logo

special-week / nonebot-plugin-bing-chat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from harry-jing/nonebot-plugin-bing-chat

0.0 0.0 0.0 565 KB

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

License: GNU General Public License v3.0

Python 100.00%

nonebot-plugin-bing-chat's Introduction

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文件中添加下表中的配置(都为可选项)


在.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_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 True 是否记录日志

对特定群聊进行屏蔽

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

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

🎉 使用

指令表

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

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

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

📄 ToDo

准备添加的功能请查看issue

🌸 致谢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.