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.4.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.4.0-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_furrybar-1.4.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.4.0.tar.gz
Algorithm Hash digest
SHA256 6823d5406c7bcd02d408324a9292d5888b9dd5c409872fea50ccb94c570efcd3
MD5 956c9c96b9d205fc143aa054e5f592ea
BLAKE2b-256 d944d9f26006e425f9886d43cd5784013da00bbacd75e362619f3cc81c4e0987

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_furrybar-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3634e7b1230620a9d1d2a4965a65a2f88cc2959051f394eb5bfca6b45a44263
MD5 02d7a2adbee73718b0ce971d8f65a7c2
BLAKE2b-256 5cf77f9e902d5a3b52ef1f16b60685076b2da8cc554859bd89cd96994df269c1

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