📖 介绍
让 AI 帮你一本正经地胡说八道
灵感来自 koishi-plugin-eitherchoice (电子蝈蝈,电子博弈,在线观看)
服务来自 EitherChoice
💿 安装
以下提到的方法 任选其一 即可
[推荐] 使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-eitherchoice
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-eitherchoice
pdm
pdm add nonebot-plugin-eitherchoice
poetry
poetry add nonebot-plugin-eitherchoice
conda
conda install nonebot-plugin-eitherchoice
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分的 plugins 项里追加写入
[tool.nonebot]
plugins = [
# ...
"nonebot_plugin_eitherchoice"
]
⚙️ 配置
在 nonebot2 项目的.env文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
PROXY |
否 | 无 | 访问接口使用的代理 |
EITHER_CHOICE_TIMEOUT |
否 | None |
访问接口超时,单位秒,可以设置为 None 以禁用超时 |
EITHER_CHOICE_RETRY |
否 | 2 |
访问接口最大重试次数 |
EITHER_CHOICE_LANG |
否 | zh-CN |
目标语言 |
EITHER_CHOICE_ALLOW_PUBLIC |
否 | True |
是否允许 AI 上网搜索相关信息 |
EITHER_CHOICE_FORCE_ASK |
否 | True |
是否每次触发指令都调用 ask 接口,不检索网站缓存 |
EITHER_CHOICE_PIC_WIDTH |
否 | 1280 |
生成图片的宽度,单位像素(实际宽度可能比这里大一倍) |
EITHER_CHOICE_MAIN_FONT |
否 | ... | 生成图片的主字体,使用 CSS 语法 |
EITHER_CHOICE_CODE_FONT |
否 | ... | 生成图片的代码字体,使用 CSS 语法 |
🎉 使用
指令
- 指令:
(对比/比较/锐评/评价/如何评价)[下/一下] 要顶的事物 (和/与/and/vs/&) 要踩的事物 - 示例:
- 对比 Python 和 JavaScript
- 锐评一下 C# & Java
- 比较 下北泽 与 东京 (加上空格防止
下或一下被当做指令的一部分去除)
效果图
📞 联系
QQ:3076823485
Telegram:@lgc2333
吹水群:1105946125
邮箱:lgc2333@126.com
💡 鸣谢
EitherChoice
- 服务提供
💰 赞助
感谢大家的赞助!你们的赞助将是我继续创作的动力!
-
赞助二维码(点击展开)
📝 更新日志
0.2.0
真是久违的更新,这玩意好像坏掉有一段时间了……但是这次修没修好还不确定……
- 修这玩意用不了的 Bug
- 默认禁用请求超时
- 微调触发指令
- 新配置
EITHER_CHOICE_FORCE_ASK
0.1.2
- 修复由于 API 地址变动导致的显示
[object Object]问题 - 微调指令匹配方式
0.1.1
- 添加配置项
EITHER_CHOICE_RETRY,当访问接口出现问题时,将会自动重试
Metadata
Release files for nonebot-plugin-eitherchoice 0.2.0.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_eitherchoice-0.2.0.post1.tar.gz | 8.4 kB | Without provenance | Details for nonebot_plugin_eitherchoice-0.2.0.post1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_eitherchoice-0.2.0.post1-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_eitherchoice-0.2.0.post1-py3-none-any.whl |
Total release size: 18.6 kB
Release files / nonebot_plugin_eitherchoice-0.2.0.post1.tar.gz
| Download URL | nonebot_plugin_eitherchoice-0.2.0.post1.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8cd54a5feaf418e94e19b03b52b74e8099690f62ed82689e01adaad7adfdc1af
|
|
BLAKE2b-256 checksum How to use checksums |
acc7493fa81d9782b3223b584303f6513e785726e1ea10a7c4dc4b91683c6aff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.9.3 CPython/3.10.12
|
Release files / nonebot_plugin_eitherchoice-0.2.0.post1-py3-none-any.whl
| Download URL | nonebot_plugin_eitherchoice-0.2.0.post1-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7fd7e020578a7d95187bd0f2006761de217aa5c014918c2dfa54e80ec1366c2
|
|
BLAKE2b-256 checksum How to use checksums |
02d04f9ad7e28c7c063290977586a7f88968ef1d79870b2e2b747511a7818425
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.9.3 CPython/3.10.12
|
Security for nonebot-plugin-eitherchoice 0.2.0.post1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.