Skip to main content

实现拟人化的群聊回复,支持好感度系统和自主回复决策

Project description

nonebot-plugin-personification

✨ 实现拟人化的群聊回复,支持好感度系统和自主回复决策 ✨

📖 介绍

这是一个基于 OpenAI API 的 NoneBot2 插件,旨在让机器人在群聊中表现得更像一个真正的成员。它能够根据上下文决定是否回复,并支持基于好感度系统的动态态度调整。

📦 依赖项

在使用本项目之前,请确保已安装以下插件:

💿 安装

使用 nb-cli 安装:

nb plugin install nonebot-plugin-personification

或者使用 pip 安装:

pip install nonebot-plugin-personification

⚙️ 配置

.env 文件中添加以下配置项:

配置项 类型 默认值 说明
personification_api_key str "" OpenAI 或兼容服务的 API Key
personification_api_url str "https://api.openai.com/v1" API 基础路径
personification_model str "gpt-3.5-turbo" 使用的模型名称
personification_whitelist list [] 启用插件的群号列表
personification_probability float 0.5 随机回复概率 (0-1)
personification_system_prompt str (见代码) 默认系统提示词
personification_prompt_path str None 自定义人格设定文件路径
personification_history_len int 50 上下文参考长度
personification_sticker_path str "data/stickers" 表情包文件夹路径
personification_poke_probability float 0.3 戳一戳响应概率

🎉 使用

  1. 将机器人加入白名单群组。
  2. 机器人在群聊中会根据配置的概率随机回复消息。
  3. 当被 @ 时,机器人必定回复。
  4. 支持戳一戳响应。
  5. 支持随机发送表情包(需配置表情包路径)。

🌟 好感度系统

本插件支持与签到插件(如 nonebot-plugin-sign-in)关联。如果检测到签到插件,将根据用户的好感度等级调整回复态度。

🖼️ 图片渲染 (可选)

安装 nonebot-plugin-htmlrender 后,插件支持将 Markdown 格式的回复渲染为图片。

📄 开源许可

本项目采用 MIT 许可协议。

💡 鸣谢

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_shiro_personification-0.1.2.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file nonebot_plugin_shiro_personification-0.1.2.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_shiro_personification-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e6523bac5028c1d61f7f953469c9391c8510e027fc9840d6375d5cc97cbe2c9d
MD5 e03a1941bd0548394d6136a88c113e8b
BLAKE2b-256 b679a12294016adfe92ce9312944f288569f612bc55f4deeba7d17e3fcab0449

See more details on using hashes here.

File details

Details for the file nonebot_plugin_shiro_personification-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_shiro_personification-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 349b2d38635a416a5112d2ab611f8562a70564e4f10b034e62d77e342f921d3c
MD5 2387d5fb2d36e17f3a43b20fb19905e5
BLAKE2b-256 36022b84971551e6124dac7354dc99f54a62ae0a13d9a7a84d4b38f5825816bc

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