✨ Gemini AI 对话 NoneBot 插件 ✨
Project description
Nonebot Plugin Gemini
Google Gemini AI 对话插件
功能
命令 | 用途 | 示例 |
---|---|---|
gemini <文本/图像> | 单次调用 Gemini 并获取回复 | gemini 编写一个NoneBot2的echo插件 |
geminichat [可选]<文本> | 开启一轮与 Gemini 的对话 | geminichat |
结束对话 | 结束本轮对话 | 结束对话 |
如果你配置了命令头,请在使用命令时将命令头加上
安装方法
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-gemini
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-gemini
pdm
pdm add nonebot-plugin-gemini
poetry
poetry add nonebot-plugin-gemini
conda
conda install nonebot-plugin-gemini
打开 nonebot2 项目根目录下的 pyproject.toml
文件, 在 [tool.nonebot]
部分追加写入
plugins = ["nonebot_plugin_gemini"]
配置
在 Google AI Studio 获取 GOOGLE_API_KEY
后,在 .env 文件 或 环境变量 中添加 GOOGLE_API_KEY
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for nonebot_plugin_gemini-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40aa126bd6d09aab5cf84b406cc9bbaf0502adc7b48b8f6992350b2cad8707c8 |
|
MD5 | 033dc0353f92f4f2a733f3ba4c26ac22 |
|
BLAKE2b-256 | c33f269b48340319cae863b3f65d87c15b720d5874fbe27bc3af1e8ae32f47d4 |
Close
Hashes for nonebot_plugin_gemini-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0cf0a950c1da31ade5097862ca0b7d548358d7941fec5a0b4b9da578bd63115 |
|
MD5 | bc5048f8c48923ffc83ced68e6a853ec |
|
BLAKE2b-256 | 0823bf26660e1183457c20b06a1c62636408a66d25c1194680be1c81a3363640 |