A nonebot plugin for Bard
Project description
nonebot-plugin-bard
介绍
- 本插件是适配Google Bard模型的聊天机器人插件,借助bard的联网能力和多模态识别能力实现更准确地回复和图片识别回复等功能。
- 根据谷歌目前的说法,使用英文向bard提问调用的模型为Gemini Pro
安装
-
手动安装
git clone https://github.com/Alpaca4610/nonebot_plugin_bard.git
下载完成后在bot项目的pyproject.toml文件手动添加插件:
plugin_dirs = ["xxxxxx","xxxxxx",......,"下载完成的插件路径/nonebot_plugin_bard"]
-
使用 pip
pip install nonebot-plugin-bard
配置文件
必选内容
在Bot根目录下的.env文件中填入Bard的cookies信息:
bard_token = xxxxxxxx
cookies获取方法
- 确保您已经拥有bard的访问权限
- 访问 https://bard.google.com/
- 按 F12 打开控制台,进入应用程序(Application) → Cookies → 复制
__Secure-1PSID
的值,注意不要包含__Secure-1PSID
本身 - cookies过一段时间可能会失效,如有报错更新即可
可选内容:
bard_enable_private_chat = True # 私聊开关,默认开启,改为False关闭
使用方法
- bard 发起对话
- 识图+图片 调用bard的多模态识别能力识图
ToDo
- 代理支持
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-0.1.0.tar.gz
(361.5 kB
view details)
Built Distribution
File details
Details for the file nonebot_plugin_bard-0.1.0.tar.gz
.
File metadata
- Download URL: nonebot_plugin_bard-0.1.0.tar.gz
- Upload date:
- Size: 361.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.9.6 Darwin/23.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b28a2c30763e60842fd2390c71a48e1df35857d6ac2dbd27db556708919255e |
|
MD5 | c642a5b82b52cdf957da6d86d472d578 |
|
BLAKE2b-256 | 216905982ab83f8b64a414cfb596a662be829b5ecf5c37b25a93bbc944c5d918 |
File details
Details for the file nonebot_plugin_bard-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: nonebot_plugin_bard-0.1.0-py3-none-any.whl
- Upload date:
- Size: 360.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.9.6 Darwin/23.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17dd56f7cd81064f4e2e18120ce5639a4cc302e6539ac07d0a007a5e562148d1 |
|
MD5 | a109ea2ca076aa5b3973614da264922a |
|
BLAKE2b-256 | 9e52ca4a1695711dd05e1eaa4bc93f9e06089576daf010e8824a260203bf6f90 |