Skip to main content

基于NoneBot2进行适配的ai对话插件

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-furrybar

✨ furrybar API 对接插件 ✨

license pypi python

基于NoneBot2进行适配的ai对话聊天插件,适合做赛博龙龙……?

📖 介绍

本插件使用标准的 openai API格式 进行编写,主要为furrybar api进行服务,同时也兼容了所有openai标准的api,方便用户在更加灵活的选择api。安装之后需要填好相应的全局配置项,以保证该模块的正常运行,具体配置填法请见配置板块。 本模块作为bot插件,仅接受学习代码结构以及了解openai标准格式的纯本地构建形式。 若本插件存在bug欢迎各位反馈!!! 目前只支持 onebotV11 暂时还未上传nonebot商店

💿 安装

使用PIP安装 在 nonebot2 项目的插件目录下, 打开命令行, 输入安装命令
pip install nonebot-plugin-furrybar

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot-plugin-furrybar"]

⚙️ 配置

在 nonebot2 项目的.env文件中添加下表中的配置,不填任何配置则自动使用默认账户

# 这里是设置模块默认状态的,可选True或者False
Private = True
# 你的api地址
api_url = "你获得的api地址"
# 你的apikey
api_key = "你获得的token"
# 你的人格设定
prompt = "人格设定"
# 你的对话预设
yushe = [
    {"role":"user","content":"戳戳"},
    {"role":"assistant","content":"干嘛?(歪头)"}
]
# 你的模型列表
furrybar_model_list = ["xxx","xxx"]
# 你的控制台群号(不填则不发送报错至控制台)
kongzhitai = 1234567

🎉 使用

指令表

指令 权限 是否需要参数 说明
@ 群员 需要艾特 艾特bot直接与ai对话
/ai 超管/群主/管理员 后面带on或者off 开启或关闭当前群聊的ai对话
/拉黑 超级管理员 需要携带对方q账号 拉黑对应用户
/切换模型 超级管理员 根据id切换模型 动态加载模型列表,用来切换当前模型
/模型调用数据 超级管理员 不需要 查看ai对话调用次数以及故障次数
/登记信息 所有人 不需要 流程式对话登记用户信息
(开启/关闭)私聊 私聊使用 不需要 开启私聊对话功能

插件完成度

目前进度:

  • 模型切换
  • 黑名单功能
  • 调用记录
  • 个人信息登记(让ai记住你是谁)
  • 本地知识库
  • bot默认状态设置
  • 分别查询用户使用热度
  • 用户对话词云
  • 自由切换api和key来适配多api情况

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_furrybar-1.3.0.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_furrybar-1.3.0-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_furrybar-1.3.0.tar.gz.

File metadata

  • Download URL: nonebot_plugin_furrybar-1.3.0.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.6

File hashes

Hashes for nonebot_plugin_furrybar-1.3.0.tar.gz
Algorithm Hash digest
SHA256 2b7eab3afc4d0c1d25a8ab38cdc8e9e6ea53d40dfd7ef14435cea86962a5084f
MD5 64146e3bd361f8c76ed10698ffe57533
BLAKE2b-256 a70de96d0797f4f3079dd73a06e2a0d68b0b331fc25f630c85ad2cd473168e08

See more details on using hashes here.

File details

Details for the file nonebot_plugin_furrybar-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_furrybar-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a04f4d66309a0452396a3733dca7c37bd46c53553e3ea3b6504f78d62bdaa969
MD5 5b18abc208f960482690606864e24aa4
BLAKE2b-256 eddc7df0ec1fbe933d0b2d1d21566ce9484288814d0005a9a42f262c4c77af9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page