一个非常简单但是很可用的使得在QQ中可以使用Google Bard的插件
Project description
nonebot_plugin_bard_bot
一个非常简单但是很可用的使得在QQ中可以使用Google Bard的插件,基于nonebot2
Required
- Python >= 3.8(不然你nonebot2都运行不起来)
- 知道如何科学上网(Google Bard国内用不了)
- 拥有Google账号(Google Bard需要登录Google账号)
Getting started
使用方式如下:
-
使用pip安装
在你的nonebot机器人目录下使用以下命令:
pip3 install nonebot-plugin-bard-bot
如果你使用的是虚拟环境,请切换至虚拟环境安装,不然无法使用
cd .venv/bin # 具体看你的.venv文件在哪
./pip3 install nonebot-plugin-bard-bot
然后在机器人目录下的pyproject.toml文件中添加以下语句
... # 此处省略其他内容
plugins = ["你安装的其他插件...", "nonebot_plugin_bard_bot"]
... # 此处省略其他内容
使用
使用本机器人首先你要知道如何使用Google Bard。因为本机器人基于bardapi库,需要获取cookies中的Secure-1PSID,Secure-1PSIDTS和Secure-1PSIDCC后才能使用
然后,请打开.env文件进行配置,在文件中写入以下语句:
COOKIE_DICT={
"__Secure-1PSID": "Your __Secure-1PSID",
"__Secure-1PSIDTS": "Your __Secure-1PSIDTS",
"__Secure-1PSIDCC": "Your __Secure-1PSIDCC"
}
随后启动机器人,使用/bard [空格] 问题
来对Google Bard询问,Google Bard会做出回答,具体思考时间取决于你的网速。
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
Built Distribution
File details
Details for the file nonebot_plugin_bard_bot-0.1.8.tar.gz
.
File metadata
- Download URL: nonebot_plugin_bard_bot-0.1.8.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 168d828f578b7c0351df4d0eb68793a8fa54b64385b73b9d24c53f41fc2c804b |
|
MD5 | a5278d3443e50f953ded0b7df66570af |
|
BLAKE2b-256 | 4e5c1acbc6483b4504bb97a22fbffb9ed16838501aa157ef63b9c601116680bb |
File details
Details for the file nonebot_plugin_bard_bot-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: nonebot_plugin_bard_bot-0.1.8-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dd7bdd558380469cbd84f45a5c1a5029c999a64283efdefe32740ac00e8e8b1 |
|
MD5 | 48b97523e59999855cf913149cd74d46 |
|
BLAKE2b-256 | 1d522ea07c79c66cf018c2b78298eafe5b352ca15788717c7fc552b7e320f6cf |