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.5.tar.gz (18.6 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.5.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_shiro_personification-0.1.5.tar.gz
Algorithm Hash digest
SHA256 621643357a79768f931103b59f019f362d89b786998acacc26f2701e7dc22af6
MD5 509f89ef12891819de96ed90f872094b
BLAKE2b-256 5e5e96f33d32ec759271611a1d4295ade3fc07501592ff77c53a0b7e401ab64e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_shiro_personification-0.1.5.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.5-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_shiro_personification-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3a6c6c2240f51042f7520bea55112b6109645afb3fec1b60fb884612aa81793b
MD5 264a95a0b5d815ff8dfccc438ec1f135
BLAKE2b-256 51be11f545a33fc146d3a7039ea2094050ee7b756cd1dc743f7a032bb98eec27

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_shiro_personification-0.1.5-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