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.5.0.tar.gz (26.9 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.5.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_furrybar-1.5.0.tar.gz
  • Upload date:
  • Size: 26.9 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.5.0.tar.gz
Algorithm Hash digest
SHA256 c4015c693aed876d1d10bdf51efe0a3f9beca0c3902eeefa5d738b25e1a7af90
MD5 babcf157d49396225391536773d7abd1
BLAKE2b-256 dead6fbc9cec48bb8dada8bf79be41a5cafb1fea5e2c17825cff8857ca4d48a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_furrybar-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e913e5be39b3f91ef5c9b038d747656ad768293bb442c9064ab2cff42035a54
MD5 50ddef3e7ffa6b2d190533a2f6f5803e
BLAKE2b-256 f6ddbeee5e511d96dbd84d43cfec2cbb77474379cd63967f421b24b040e36224

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