Skip to main content

一个非常简单但是很可用的使得在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

nonebot_plugin_bard_bot-0.1.8.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

nonebot_plugin_bard_bot-0.1.8-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_bard_bot-0.1.8.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_bard_bot-0.1.8.tar.gz
Algorithm Hash digest
SHA256 168d828f578b7c0351df4d0eb68793a8fa54b64385b73b9d24c53f41fc2c804b
MD5 a5278d3443e50f953ded0b7df66570af
BLAKE2b-256 4e5c1acbc6483b4504bb97a22fbffb9ed16838501aa157ef63b9c601116680bb

See more details on using hashes here.

File details

Details for the file nonebot_plugin_bard_bot-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_bard_bot-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 0dd7bdd558380469cbd84f45a5c1a5029c999a64283efdefe32740ac00e8e8b1
MD5 48b97523e59999855cf913149cd74d46
BLAKE2b-256 1d522ea07c79c66cf018c2b78298eafe5b352ca15788717c7fc552b7e320f6cf

See more details on using hashes here.

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