This commit is contained in:
Typer_Body
2026-05-07 23:33:54 +08:00
parent d176a448e0
commit fc40d3c949
34 changed files with 2297 additions and 1075 deletions

View File

@@ -74,15 +74,24 @@ class ConditionNode(WorkflowNode):
left_num = float(left)
right_num = float(right)
if operator == "==": return left_num == right_num
elif operator == "!=": return left_num != right_num
elif operator == ">": return left_num > right_num
elif operator == "<": return left_num < right_num
elif operator == ">=": return left_num >= right_num
elif operator == "<=": return left_num <= right_num
if operator == "==":
return left_num == right_num
elif operator == "!=":
return left_num != right_num
elif operator == ">":
return left_num > right_num
elif operator == "<":
return left_num < right_num
elif operator == ">=":
return left_num >= right_num
elif operator == "<=":
return left_num <= right_num
except ValueError:
if operator == "==": return left == right
elif operator == "!=": return left != right
elif operator in (">", "<", ">=", "<="): return False
if operator == "==":
return left == right
elif operator == "!=":
return left != right
elif operator in (">", "<", ">=", "<="):
return False
return False

View File

@@ -31,7 +31,6 @@ class DatabaseQueryNode(WorkflowNode):
async def execute(self, inputs: dict[str, Any], context: ExecutionContext) -> dict[str, Any]:
connection_type = self.get_config("connection_type", "postgresql")
connection_string = self.get_config("connection_string", "")
query = self.get_config("query", "")
query_type = self.get_config("query_type", "select")
timeout = self.get_config("timeout", 30)

View File

@@ -30,7 +30,6 @@ class ParameterExtractorNode(WorkflowNode):
config_schema: ClassVar[list[NodeConfig]] = []
async def execute(self, inputs: dict[str, Any], context: ExecutionContext) -> dict[str, Any]:
text = inputs.get("text", "")
param_defs = self.get_config("parameters", [])
extracted = {}

View File

@@ -30,7 +30,6 @@ class QuestionClassifierNode(WorkflowNode):
config_schema: ClassVar[list[NodeConfig]] = []
async def execute(self, inputs: dict[str, Any], context: ExecutionContext) -> dict[str, Any]:
question = inputs.get("question", "")
categories = self.get_config("categories", [])
if categories:

View File

@@ -30,7 +30,4 @@ class SendMessageNode(WorkflowNode):
config_schema: ClassVar[list[NodeConfig]] = []
async def execute(self, inputs: dict[str, Any], context: ExecutionContext) -> dict[str, Any]:
message = inputs.get("message", "")
target = inputs.get("target") or self.get_config("target_id", "")
return {"status": "sent", "message_id": f"msg_{context.execution_id}"}