Compare commits

...

5 Commits

Author SHA1 Message Date
Soulter da351991f8 📦 release: bump verstion to v4.0.0-beta.3 2025-09-03 01:01:48 +08:00
Soulter 3305152e50 fix: 修复当人格 ID 为中文时,不可保存的问题 2025-09-03 00:59:07 +08:00
Soulter bea7bae674 fix: dict read 2025-09-03 00:56:41 +08:00
Soulter 45773d38ed 📦 release: bump verstion to v4.0.0-beta.2 2025-09-03 00:32:49 +08:00
Soulter 8d4c176314 fix: correct image_caption logic and remove redundant config call 2025-09-03 00:31:18 +08:00
6 changed files with 3423 additions and 12 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ import os
from astrbot.core.utils.astrbot_path import get_astrbot_data_path
VERSION = "4.0.0-beta.1"
VERSION = "4.0.0-beta.3"
DB_PATH = os.path.join(get_astrbot_data_path(), "data_v4.db")
# 默认配置
@@ -1,3 +1,3 @@
# What's Changed
> 请仔细阅读:**这是 v4.0.0 的测试版本(beta.1),功能尚未完全稳定和加入**。v4.0.0 被设计为向前兼容,如有任何插件兼容性问题或者其他异常请在 GitHub 提交 [Issue](https://github.com/AstrBotDevs/AstrBot/issues)。在测试版本期间,您可以无缝回退到旧版本的 AstrBot,并且数据不受影响。新版本文档请[从此](https://docs-v4.astrbot.app/)访问,直到第一个 v4.0.0 稳定版本发布。
> 请仔细阅读:**这是 v4.0.0 的测试版本(beta.3),功能尚未完全稳定和加入**。v4.0.0 被设计为向前兼容,如有任何插件兼容性问题或者其他异常请在 GitHub 提交 [Issue](https://github.com/AstrBotDevs/AstrBot/issues)。在测试版本期间,您可以无缝回退到旧版本的 AstrBot,并且数据不受影响。新版本文档请[从此](https://docs-v4.astrbot.app/)访问,直到第一个 v4.0.0 稳定版本发布。
+1 -2
View File
@@ -383,8 +383,7 @@ export default {
messageType: 'success',
personaIdRules: [
v => !!v || this.tm('validation.required'),
v => (v && v.length >= 2) || this.tm('validation.minLength', { min: 2 }),
v => /^[a-zA-Z0-9_-]+$/.test(v) || this.tm('validation.alphanumeric')
v => (v && v.length >= 0) || this.tm('validation.minLength', { min: 2 }),
],
systemPromptRules: [
v => !!v || this.tm('validation.required'),
+12 -7
View File
@@ -25,14 +25,18 @@ class LongTermMemory:
def cfg(self, event: AstrMessageEvent):
cfg = self.context.get_config(umo=event.unified_msg_origin)
try:
max_cnt = int(cfg["group_message_max_cnt"])
max_cnt = int(cfg["provider_ltm_settings"]["group_message_max_cnt"])
except BaseException as e:
logger.error(e)
max_cnt = 300
image_caption = cfg["image_caption"]
image_caption_prompt = cfg["image_caption_prompt"]
image_caption_provider_id = cfg["image_caption_provider_id"]
active_reply = cfg["active_reply"]
image_caption = (
True
if cfg["provider_settings"]["default_image_caption_provider_id"]
else False
)
image_caption_prompt = cfg["provider_settings"]["image_caption_prompt"]
image_caption_provider_id = cfg["provider_settings"]["default_image_caption_provider_id"]
active_reply = cfg["provider_ltm_settings"]["active_reply"]
enable_active_reply = active_reply.get("enable", False)
ar_method = active_reply["method"]
ar_possibility = active_reply["possibility_reply"]
@@ -88,7 +92,9 @@ class LongTermMemory:
if cfg["ar_whitelist"] and (
event.unified_msg_origin not in cfg["ar_whitelist"]
and (event.get_group_id() and event.get_group_id() not in cfg["ar_whitelist"])
and (
event.get_group_id() and event.get_group_id() not in cfg["ar_whitelist"]
)
):
return False
@@ -112,7 +118,6 @@ class LongTermMemory:
if isinstance(comp, Plain):
final_message += f" {comp.text}"
elif isinstance(comp, Image):
cfg = self.cfg(event)
if cfg["image_caption"]:
try:
caption = await self.get_image_caption(
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "AstrBot"
version = "4.0.0-beta.1"
version = "4.0.0-beta.3"
description = "易上手的多平台 LLM 聊天机器人及开发框架"
readme = "README.md"
requires-python = ">=3.10"
Generated
+3407
View File
File diff suppressed because it is too large Load Diff