优化函数参数解析,增加对JSON解析错误的处理;更新run_shell_command描述

This commit is contained in:
2024-12-16 03:02:05 +08:00
parent dacb5aa854
commit 006f925afd
2 changed files with 7 additions and 6 deletions

View File

@ -97,9 +97,7 @@ async def run_python_code(code: str, b: Bot, e: MessageEvent) -> str:
@on_function_call(
description="在设备上运行shell命令, Run command on this device"
).params(command=String(description="shell命令内容")).permission(SUPERUSER).name(
"run_shell_command"
)
).params(command=String(description="shell命令内容")).permission(SUPERUSER)
async def run_shell_command(command: str, b: Bot, e: MessageEvent) -> str:
"""运行shell命令"""
try: