fix actions

This commit is contained in:
jxxghp
2025-02-27 13:09:01 +08:00
parent 4a42b0d000
commit ab0008be86
16 changed files with 116 additions and 29 deletions
+9 -1
View File
@@ -2,7 +2,7 @@ from typing import List, Optional, Union
from pydantic import Field
from app.actions import BaseAction
from app.actions import BaseAction, ActionChain
from app.schemas import ActionParams, ActionContext, MessageChannel
@@ -19,6 +19,10 @@ class SendMessageAction(BaseAction):
发送消息
"""
def __init__(self):
super().__init__()
self.chain = ActionChain()
@property
def name(self) -> str:
return "发送消息"
@@ -27,6 +31,10 @@ class SendMessageAction(BaseAction):
def description(self) -> str:
return "发送特定消息"
@property
def data(self) -> dict:
return SendMessageParams().dict()
@property
def success(self) -> bool:
return self.done