mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-03-20 03:57:30 +08:00
fix agent
This commit is contained in:
@@ -11,11 +11,11 @@ class SendMessageTool(MoviePilotTool):
|
||||
name: str = "send_message"
|
||||
description: str = "发送消息通知,向用户发送操作结果或重要信息。"
|
||||
|
||||
async def _arun(self, message: str, explanation: str, message_type: Optional[str] = "info") -> str:
|
||||
async def _arun(self, message: str, explanation: str, message_type: Optional[str] = "info", **kwargs) -> str:
|
||||
logger.info(f"执行工具: {self.name}, 参数: message={message}, message_type={message_type}")
|
||||
try:
|
||||
message_helper = MessageHelper()
|
||||
message_helper.put(message=message, role="system", title=f"AI助手通知 ({message_type})")
|
||||
message_helper.put(message=message, role="system", title=f"MoviePilot助手通知 ({message_type})")
|
||||
return "消息已发送。"
|
||||
except Exception as e:
|
||||
logger.error(f"发送消息失败: {e}")
|
||||
|
||||
Reference in New Issue
Block a user