fix actions

This commit is contained in:
jxxghp
2025-02-19 17:44:14 +08:00
parent 1317d9c4f0
commit b41de1a982
11 changed files with 179 additions and 72 deletions
+9
View File
@@ -2,9 +2,14 @@ from abc import ABC, abstractmethod
from pydantic.main import BaseModel
from app.chain import ChainBase
from app.schemas import ActionContext, ActionParams
class ActionChain(ChainBase):
pass
class BaseAction(BaseModel, ABC):
"""
工作流动作基类
@@ -13,6 +18,10 @@ class BaseAction(BaseModel, ABC):
# 完成标志
_done_flag = False
def __init__(self):
super().__init__()
self.chain = ActionChain()
@property
@abstractmethod
def name(self) -> str: