Skip to main content

也许是个有情感的聊天机器人

Project description

logo

✨ nonebot-plugin-nyaturingtest ✨

NotYetAnotherTuringTest

license pypi python ruff uv last-commit

📖 介绍

也许是个有情感的群聊天机器人?

特点:

  • 具有基于 VAD 三维情感模型情感模块
  • 具有基于向量搜索的长期记忆和知识
  • 能够从聊天信息中自主提取知识记忆
  • 能够考虑自身的情感状态和记忆自行选择要不要回复和回复内容,比较拟人
  • 能够对每个人类用户进行情感记忆
  • 不似人类

💿 安装

[!IMPORTANT] 要使用本插件, 你至少需要

  • 一个有效的 openai 规范接口 api key (根据你的 base_url,可以不是 openai 的)
  • 如果你的 openai api key 是从 google cloud 或者 azure, deepseek, 硅基流动,自己架设的 llm 服务等而非在 openai 申请的, 你需要在 .env 文件中配置 nyaturingtest_chat_openai_base_url 为对应的 api 地址
  • 一个有效的硅基流动 api key 用于嵌入模型请求 (https://siliconflow.com/)
使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-nyaturingtest --upgrade

使用 pypi 源安装

nb plugin install nonebot-plugin-nyaturingtest --upgrade -i "https://pypi.org/simple"

使用清华源安装

nb plugin install nonebot-plugin-nyaturingtest --upgrade -i "https://pypi.tuna.tsinghua.edu.cn/simple"
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
uv
uv add nonebot-plugin-nyaturingtest

安装仓库 master 分支

uv add git+https://github.com/shadow3aaa/nonebot-plugin-nyaturingtest@master
pdm
pdm add nonebot-plugin-nyaturingtest

安装仓库 master 分支

pdm add git+https://github.com/shadow3aaa/nonebot-plugin-nyaturingtest@master
poetry
poetry add nonebot-plugin-nyaturingtest

安装仓库 master 分支

poetry add git+https://github.com/shadow3aaa/nonebot-plugin-nyaturingtest@master

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_nyaturingtest"]

📝 TODO

  • 权限控制
  • 更多可选的语言模型供应商
  • 更多可选的嵌入模型供应商
  • 支持更多平台(目前支持: Onebot v11)
  • 优化机器人效果
    • 让回复机制更加拟人
    • 让回复欲望更加拟人
    • 优化情感反馈机制
    • 支持视觉模型
    • 优化记忆模块
      • 优化长期记忆检索
      • 优化遗忘机制
      • 对话时进行场景感知性总结
    • 支持多种语言

⚙️ 配置

在 nonebot2 项目的.env文件中添加下表中的配置

配置项 必填 默认值 说明
nyaturingtest_chat_openai_api_key openai api 接口的 api key
nyaturingtest_chat_openai_model "gpt-3.5-turbo" openai api 接口请求的 模型名称
nyaturingtest_chat_openai_base_url "https://api.openai.com/v1/chat/completions" openai 接口请求的 url
nyaturingtest_chat_gemini_api_key gemini api 接口的 api key
nyaturingtest_embedding_siliconflow_api_key siliconflow(硅基流动) api 接口的 api key
nyaturingtest_enabled_groups 否(但是不填写此插件就无意义) [](空列表) 仅在这些群组中启用插件

🎉 使用

指令表

指令 权限 范围 说明
set_role <角色名> <角色设定> 所有人 群聊 设置角色
role 所有人 群聊 获取当前角色
calm 所有人 群聊 冷静(强制归零情绪)
reset 所有人 群聊 重置会话
status 所有人 群聊 获取状态
provider 所有人 群聊 获取当前提供商
set_provider <提供者> 所有人 群聊 设置提供商 (gemini/openai)
set_preset <预设名称> 所有人 群聊 设置预设
presets 所有人 群聊 获取可用预设
help 所有人 群聊 显示帮助信息

🎨 效果图

别急

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_nyaturingtest-0.1.0.tar.gz (37.4 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_nyaturingtest-0.1.0-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_nyaturingtest-0.1.0.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_nyaturingtest-0.1.0.tar.gz
Algorithm Hash digest
SHA256 57986cf2583c3d127618d3893b9589ecb1cee808b26fcba8726385f4c8eeccc0
MD5 a4e9073c3667faf438f5ddde863b6e62
BLAKE2b-256 976607fd68d716d3c09ec3bfef00baafcb2f93b4445c9a6db19bbbebd2dfdc37

See more details on using hashes here.

File details

Details for the file nonebot_plugin_nyaturingtest-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_nyaturingtest-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0b9b19601b8c90c63eba702c189e2b8e945adc8f89dbfcb44aff28132d76e07
MD5 8a9db5feabb157af2bb0c91233cfca9d
BLAKE2b-256 9491c67a860cf7511c42c8724be377dbfeb4945f526d2cab2bbbfd88bc2fbd9c

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