Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

所有重要更改都将记录在此文件中。

## [3.2.0] - 2026-06-07

### 学习模块

- 将黑话学习、表达方式学习和人格学习拆分为独立服务模块,学习流水线与渐进学习流程改为委托给专门模块处理。

### WebUI

- Dashboard 新增学习模块控制台,汇总全局学习效率、待办、内容样本和最近批次,并提供黑话、表达方式、人格、审查、内容和监控快捷入口。
- 新增黑话学习、表达方式学习、人格学习三个独立 WebUI 子模块页面,分别展示 KPI、列表、快捷操作和 ECharts 可视化图表。
- 增加 iOS-like 指针物理反馈、按压回弹和移动端响应式收敛,并尊重 `prefers-reduced-motion`。

### 版本

- 将插件发布版本号提升至 `3.2.0`。

## [3.0.15] - 2026-05-30

### WebUI
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

让 AstrBot 在群聊中持续采集、学习、审查并注入上下文,使 Bot 逐步具备表达风格、群组黑话、社交关系、长期记忆和人格演化能力。

[![Version](https://img.shields.io/badge/version-3.1.5-blue.svg)](https://github.com/NickCharlie/astrbot_plugin_self_learning)
[![Version](https://img.shields.io/badge/version-3.2.0-blue.svg)](https://github.com/NickCharlie/astrbot_plugin_self_learning)
[![License](https://img.shields.io/badge/license-AGPL--3.0-green.svg)](LICENSE)
[![AstrBot](https://img.shields.io/badge/AstrBot-%3E%3D4.11.4-orange.svg)](https://github.com/Soulter/AstrBot)
[![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/)
Expand Down
2 changes: 1 addition & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<br>

[![Version](https://img.shields.io/badge/version-3.1.5-blue.svg)](https://github.com/NickCharlie/astrbot_plugin_self_learning) [![License](https://img.shields.io/badge/license-AGPL--3.0-green.svg)](LICENSE) [![AstrBot](https://img.shields.io/badge/AstrBot-%3E%3D4.11.4-orange.svg)](https://github.com/Soulter/AstrBot) [![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/)
[![Version](https://img.shields.io/badge/version-3.2.0-blue.svg)](https://github.com/NickCharlie/astrbot_plugin_self_learning) [![License](https://img.shields.io/badge/license-AGPL--3.0-green.svg)](LICENSE) [![AstrBot](https://img.shields.io/badge/AstrBot-%3E%3D4.11.4-orange.svg)](https://github.com/Soulter/AstrBot) [![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/)

[Features](#what-we-can-do) · [Quick Start](#quick-start) · [Web UI](#visual-management-interface) · [Community](#community) · [Contributing](CONTRIBUTING.md)

Expand Down
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# AstrBot 自学习插件
__version__ = "3.1.5"
__version__ = "3.2.0"

# Ensure parent namespace packages ("data", "data.plugins") are
# durably registered in sys.modules. AstrBot loads plugins via
Expand Down
6 changes: 6 additions & 0 deletions _conf_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,12 @@
"hint": "当知识+记忆候选文档数量低于此阈值时,跳过Reranker以节省延迟。设为0则始终执行重排序",
"default": 3
},
"provider_retry_interval_seconds": {
"description": "Provider 重试间隔(秒)",
"type": "float",
"hint": "AstrBot 冷启动时 Provider 注册表可能尚未就绪。插件会按此间隔重试绑定 Embedding/Reranker Provider。",
"default": 10.0
},
"knowledge_engine": {
"description": "知识引擎",
"type": "string",
Expand Down
7 changes: 7 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class PluginConfig(BaseModel):
rerank_provider_id: Optional[str] = None
rerank_top_k: int = 5
rerank_min_candidates: int = 3 # 候选文档数低于此阈值时跳过 rerank 以节省延迟
provider_retry_interval_seconds: float = 10.0 # Provider 注册表未就绪时的重试间隔

# v2 Architecture: Knowledge engine
knowledge_engine: str = "legacy" # "lightrag" | "legacy"
Expand Down Expand Up @@ -363,6 +364,9 @@ def create_from_config(cls, config: dict, data_dir: Optional[str] = None) -> 'Pl
rerank_provider_id=v2_settings.get('rerank_provider_id', None),
rerank_top_k=v2_settings.get('rerank_top_k', 5),
rerank_min_candidates=v2_settings.get('rerank_min_candidates', 3),
provider_retry_interval_seconds=v2_settings.get(
'provider_retry_interval_seconds', 10.0
),
knowledge_engine=v2_settings.get('knowledge_engine', 'legacy'),
lightrag_query_mode=v2_settings.get('lightrag_query_mode', 'local'),
memory_engine=v2_settings.get('memory_engine', 'legacy'),
Expand Down Expand Up @@ -616,6 +620,9 @@ def validate_config(self) -> List[str]:
if self.topic_detection_interval_messages <= 0:
errors.append("话题检测触发消息数必须大于0")

if self.provider_retry_interval_seconds <= 0:
errors.append("Provider重试间隔必须大于0秒")

if self.message_min_length >= self.message_max_length:
errors.append("消息最小长度必须小于最大长度")

Expand Down
7 changes: 7 additions & 0 deletions core/plugin_lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,13 @@ async def _delayed_provider_reinitialization(self) -> None:
logger.info(
f"成功配置了 {p.llm_adapter.providers_configured} 个提供商"
)

if getattr(p, "v2_integration", None):
refreshed = await p.v2_integration.refresh_provider_bindings(
force=True
)
if refreshed:
logger.info("V2 Provider 延迟绑定刷新完成")
except Exception as e:
logger.error(f"延迟重新初始化提供商配置失败: {e}")

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AstrBot 自主学习插件的实现文档和使用文档。

- 插件名: `astrbot_plugin_self_learning`
- 展示名: `self-learning`
- 当前元数据版本: `3.0.5`
- 当前元数据版本: `3.2.0`
- 最低 AstrBot 版本: `4.11.4`
- 主要入口: `main.py`
- 配置入口: `_conf_schema.json`, `config.py`
Expand Down
2 changes: 1 addition & 1 deletion metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "astrbot_plugin_self_learning"
author: "NickMo, EterUltimate"
display_name: "self-learning"
description: "SELF LEARNING 自主学习插件 — 让 AI 聊天机器人自主学习对话风格、理解群组黑话、管理社交关系与好感度、自适应人格演化,像真人一样自然对话。(使用前必须手动备份人格数据)"
version: "3.1.5"
version: "3.2.0"
repo: "https://github.com/NickCharlie/astrbot_plugin_self_learning"
tags:
- "自学习"
Expand Down
Loading
Loading