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.6.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.6.0-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_furrybar-1.6.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.6.0.tar.gz
Algorithm Hash digest
SHA256 811a32ddf3761ed61a7508f076ae3071e03eeaf45eee7636da7e276df3b28300
MD5 8b9e1fb52878b62c200d83f8bea6e841
BLAKE2b-256 365617c078897c647bcbf92e6ee0ef4b8c4c448ff55bac10e29e7c578fa9faa1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_furrybar-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 673478423b417048a8f1aa4b58177b0b2d0299040eb5bf529f1bae555c30dc5f
MD5 692f02c25ee2e3cbc3271376b1c57fe1
BLAKE2b-256 cd7d0417dbded657337f0f855741924d31b3825806a37d6acd387d3ff2c0fa2d

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