Compare commits
8 Commits
features/s
...
v4.0.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45773d38ed | ||
|
|
8d4c176314 | ||
|
|
9ca5c87c4c | ||
|
|
36a6f00e5f | ||
|
|
e24a5b4cb5 | ||
|
|
f88031b0c9 | ||
|
|
830151e6da | ||
|
|
1e14fba81a |
@@ -6,7 +6,7 @@ import os
|
||||
|
||||
from astrbot.core.utils.astrbot_path import get_astrbot_data_path
|
||||
|
||||
VERSION = "4.0.0"
|
||||
VERSION = "4.0.0-beta.2"
|
||||
DB_PATH = os.path.join(get_astrbot_data_path(), "data_v4.db")
|
||||
|
||||
# 默认配置
|
||||
@@ -51,10 +51,6 @@ DEFAULT_CONFIG = {
|
||||
"enable": True,
|
||||
"default_provider_id": "",
|
||||
"default_image_caption_provider_id": "",
|
||||
"default_summarize_provider_id": "",
|
||||
"context_exceed_calc_method": "token_size",
|
||||
"max_token_size": 128000,
|
||||
"max_context_length": 100,
|
||||
"image_caption_prompt": "Please describe the image using Chinese.",
|
||||
"provider_pool": ["*"], # "*" 表示使用所有可用的提供者
|
||||
"wake_prefix": "",
|
||||
@@ -68,6 +64,7 @@ DEFAULT_CONFIG = {
|
||||
"default_personality": "default",
|
||||
"persona_pool": ["*"],
|
||||
"prompt_prefix": "",
|
||||
"max_context_length": -1,
|
||||
"dequeue_context_length": 1,
|
||||
"streaming_response": False,
|
||||
"show_tool_use_status": False,
|
||||
@@ -1835,12 +1832,6 @@ CONFIG_METADATA_3 = {
|
||||
"_special": "select_provider",
|
||||
"hint": "留空时使用第一个模型。",
|
||||
},
|
||||
"provider_settings.default_summarize_provider_id": {
|
||||
"description": "默认对话总结模型",
|
||||
"type": "string",
|
||||
"_special": "select_provider",
|
||||
"hint": "留空代表不进行对话总结。可用于压缩上下文以减少 token 用量,并一定程度上保持历史聊天记忆。",
|
||||
},
|
||||
"provider_settings.default_image_caption_provider_id": {
|
||||
"description": "默认图片转述模型",
|
||||
"type": "string",
|
||||
@@ -1859,28 +1850,6 @@ CONFIG_METADATA_3 = {
|
||||
"hint": "留空代表不使用。",
|
||||
"_special": "select_provider_tts",
|
||||
},
|
||||
"provider_settings.context_exceed_calc_method": {
|
||||
"description": "上下文超限的触发策略",
|
||||
"type": "string",
|
||||
"options": ["token_size", "context_length"],
|
||||
"labels": ["基于 Token 长度(估算)", "基于对话轮数"],
|
||||
"hint": "如配置了对话总结模型,则触发时总结对话内容,否则丢弃最旧部分。"
|
||||
},
|
||||
"provider_settings.max_context_length": {
|
||||
"description": "对话轮数上限",
|
||||
"type": "int",
|
||||
"condition": {
|
||||
"provider_settings.context_exceed_calc_method": "context_length"
|
||||
}
|
||||
},
|
||||
"provider_settings.max_token_size": {
|
||||
"description": "Token 长度上限(估算)",
|
||||
"type": "int",
|
||||
"hint": "超出这个数量时丢弃最旧的部分。",
|
||||
"condition": {
|
||||
"provider_settings.context_exceed_calc_method": "token_size"
|
||||
}
|
||||
},
|
||||
"provider_settings.image_caption_prompt": {
|
||||
"description": "图片转述提示词",
|
||||
"type": "text",
|
||||
@@ -1957,7 +1926,7 @@ CONFIG_METADATA_3 = {
|
||||
},
|
||||
"provider_settings.max_agent_step": {
|
||||
"description": "工具调用轮数上限",
|
||||
"type": "int",
|
||||
"type": "bool",
|
||||
},
|
||||
"provider_settings.streaming_response": {
|
||||
"description": "流式回复",
|
||||
@@ -1967,6 +1936,11 @@ CONFIG_METADATA_3 = {
|
||||
"description": "不支持流式回复的平台采取分段输出",
|
||||
"type": "bool",
|
||||
},
|
||||
"provider_settings.max_context_length": {
|
||||
"description": "最多携带对话轮数",
|
||||
"type": "int",
|
||||
"hint": "超出这个数量时丢弃最旧的部分,一轮聊天记为 1 条。-1 为不限制。",
|
||||
},
|
||||
"provider_settings.dequeue_context_length": {
|
||||
"description": "丢弃对话轮数",
|
||||
"type": "int",
|
||||
|
||||
3
changelogs/v4.0.0-beta.1.md
Normal file
3
changelogs/v4.0.0-beta.1.md
Normal file
@@ -0,0 +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 稳定版本发布。
|
||||
1
changelogs/v4.0.0-beta.2.md
Normal file
1
changelogs/v4.0.0-beta.2.md
Normal file
@@ -0,0 +1 @@
|
||||
# What's Changed
|
||||
@@ -29,7 +29,7 @@ class LongTermMemory:
|
||||
except BaseException as e:
|
||||
logger.error(e)
|
||||
max_cnt = 300
|
||||
image_caption = cfg["image_caption"]
|
||||
image_caption = True if cfg["image_caption_provider_id"] else False
|
||||
image_caption_prompt = cfg["image_caption_prompt"]
|
||||
image_caption_provider_id = cfg["image_caption_provider_id"]
|
||||
active_reply = cfg["active_reply"]
|
||||
@@ -112,7 +112,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,6 +1,6 @@
|
||||
[project]
|
||||
name = "AstrBot"
|
||||
version = "4.0.0"
|
||||
version = "4.0.0-beta.2"
|
||||
description = "易上手的多平台 LLM 聊天机器人及开发框架"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
|
||||
@@ -39,4 +39,7 @@ faiss-cpu
|
||||
aiosqlite
|
||||
py-cord>=2.6.1
|
||||
slack-sdk
|
||||
pydub
|
||||
pydub
|
||||
sqlmodel
|
||||
deprecated
|
||||
sqlalchemy[asyncio]
|
||||
Reference in New Issue
Block a user