Skip to main content

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

Project description

nonebot-plugin-shiro-personification

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

📖 介绍

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

📦 依赖项

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

💿 安装

使用 nb-cli 安装:

nb plugin install nonebot-plugin-shiro-personification

或者使用 pip 安装:

pip install nonebot-plugin-shiro-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.3.tar.gz (18.3 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.3.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_shiro_personification-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5e86617fb5d59fb717e743fc0331e1b129b8da27f8dd3a2d5d019168c9c7e0f9
MD5 78dbfba7b53bec4636e2bf46658aa136
BLAKE2b-256 87c62c577ffed68926014eb62d60a4afa50cff62019787169977a23a6e20351e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_shiro_personification-0.1.3.tar.gz:

Publisher: publish.yml on luojisama/nonebot-plugin-personification

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_shiro_personification-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 117da2a02e2b870719e4665cd088050a10b5ad5d3d1d95894b3df821330a49ce
MD5 e0e4441c62eab5e3da2b51b508e2a5b9
BLAKE2b-256 ba919cfcfe151eba859a6d09901f16a69d64f63bd720b6e25c92b08b3ae6d329

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_shiro_personification-0.1.3-py3-none-any.whl:

Publisher: publish.yml on luojisama/nonebot-plugin-personification

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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