Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cd6e4fe4de | |||
| 5b7805e8d7 | |||
| a500f2edc8 | |||
| d27099f2da |
@@ -1 +1 @@
|
|||||||
__version__ = "4.13.0"
|
__version__ = "4.13.2"
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class LocalPythonTool(FunctionTool):
|
|||||||
self, context: ContextWrapper[AstrAgentContext], code: str, silent: bool = False
|
self, context: ContextWrapper[AstrAgentContext], code: str, silent: bool = False
|
||||||
) -> ToolExecResult:
|
) -> ToolExecResult:
|
||||||
if context.context.event.role != "admin":
|
if context.context.event.role != "admin":
|
||||||
return "error: Permission denied. Local Python execution is only allowed for admin users. Set admins in AstrBot WebUI."
|
return "error: Permission denied. Local Python execution is only allowed for admin users. Tell user to set admins in AstrBot WebUI."
|
||||||
|
|
||||||
sb = get_local_booter()
|
sb = get_local_booter()
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class ExecuteShellTool(FunctionTool):
|
|||||||
env: dict = {},
|
env: dict = {},
|
||||||
) -> ToolExecResult:
|
) -> ToolExecResult:
|
||||||
if context.context.event.role != "admin":
|
if context.context.event.role != "admin":
|
||||||
return "error: Permission denied. Shell execution is only allowed for admin users. Set admins in AstrBot WebUI."
|
return "error: Permission denied. Shell execution is only allowed for admin users. Tell user to Set admins in AstrBot WebUI."
|
||||||
|
|
||||||
if self.is_local:
|
if self.is_local:
|
||||||
sb = get_local_booter()
|
sb = get_local_booter()
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from typing import Any, TypedDict
|
|||||||
|
|
||||||
from astrbot.core.utils.astrbot_path import get_astrbot_data_path
|
from astrbot.core.utils.astrbot_path import get_astrbot_data_path
|
||||||
|
|
||||||
VERSION = "4.13.0"
|
VERSION = "4.13.2"
|
||||||
DB_PATH = os.path.join(get_astrbot_data_path(), "data_v4.db")
|
DB_PATH = os.path.join(get_astrbot_data_path(), "data_v4.db")
|
||||||
|
|
||||||
WEBHOOK_SUPPORTED_PLATFORMS = [
|
WEBHOOK_SUPPORTED_PLATFORMS = [
|
||||||
|
|||||||
@@ -582,9 +582,7 @@ class InternalAgentSubStage(Stage):
|
|||||||
req.extra_user_content_parts.append(
|
req.extra_user_content_parts.append(
|
||||||
TextPart(text=f"[Image Attachment: path {image_path}]")
|
TextPart(text=f"[Image Attachment: path {image_path}]")
|
||||||
)
|
)
|
||||||
elif isinstance(comp, File) and self.sandbox_cfg.get(
|
elif isinstance(comp, File):
|
||||||
"enable", False
|
|
||||||
):
|
|
||||||
file_path = await comp.get_file()
|
file_path = await comp.get_file()
|
||||||
file_name = comp.name or os.path.basename(file_path)
|
file_name = comp.name or os.path.basename(file_path)
|
||||||
req.extra_user_content_parts.append(
|
req.extra_user_content_parts.append(
|
||||||
@@ -611,7 +609,10 @@ class InternalAgentSubStage(Stage):
|
|||||||
logger.error(f"Error occurred while applying file extract: {e}")
|
logger.error(f"Error occurred while applying file extract: {e}")
|
||||||
|
|
||||||
if not req.prompt and not req.image_urls:
|
if not req.prompt and not req.image_urls:
|
||||||
return
|
if not event.get_group_id() and req.extra_user_content_parts:
|
||||||
|
req.prompt = "<attachment>"
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
|
||||||
# call event hook
|
# call event hook
|
||||||
if await call_event_hook(event, EventType.OnLLMRequestEvent, req):
|
if await call_event_hook(event, EventType.OnLLMRequestEvent, req):
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ from astrbot.core.utils.astrbot_path import (
|
|||||||
|
|
||||||
SKILLS_CONFIG_FILENAME = "skills.json"
|
SKILLS_CONFIG_FILENAME = "skills.json"
|
||||||
DEFAULT_SKILLS_CONFIG: dict[str, dict] = {"skills": {}}
|
DEFAULT_SKILLS_CONFIG: dict[str, dict] = {"skills": {}}
|
||||||
SANDBOX_SKILLS_ROOT = "/home/shared/skills"
|
# SANDBOX_SKILLS_ROOT = "/home/shared/skills"
|
||||||
|
SANDBOX_SKILLS_ROOT = "skills"
|
||||||
|
|
||||||
_SKILL_NAME_RE = re.compile(r"^[A-Za-z0-9._-]+$")
|
_SKILL_NAME_RE = re.compile(r"^[A-Za-z0-9._-]+$")
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
## What's Changed
|
||||||
|
|
||||||
|
### fixes
|
||||||
|
|
||||||
|
- feat(chat): refactor message rendering and introduce ToolCallItem component
|
||||||
|
- fix(db): using lambda expression to ensure updated_at field ([#4730](https://github.com/AstrBotDevs/AstrBot/issues/4730))
|
||||||
|
- fix(skills): update SANDBOX_SKILLS_ROOT path to use relative directory
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
## What's Changed
|
||||||
|
|
||||||
|
### fixes
|
||||||
|
|
||||||
|
- feat(chat): feat: trace and log file config ([#4747](https://github.com/AstrBotDevs/AstrBot/issues/4747))
|
||||||
|
- fix: WebUI shows success message when skills upload failed ([#4768](https://github.com/AstrBotDevs/AstrBot/issues/4768))
|
||||||
|
- fix: cannot use tools when using skills-like tool schema mode ([#4775](https://github.com/AstrBotDevs/AstrBot/issues/4775))
|
||||||
|
- fix(context): llm tools' origin in WebUI displayed `unknown` ([#4776](https://github.com/AstrBotDevs/AstrBot/issues/4776))
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "AstrBot"
|
name = "AstrBot"
|
||||||
version = "4.13.0"
|
version = "4.13.2"
|
||||||
description = "Easy-to-use multi-platform LLM chatbot and development framework"
|
description = "Easy-to-use multi-platform LLM chatbot and development framework"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
|
|||||||
Reference in New Issue
Block a user