add updated_at to sync workflow api

This commit is contained in:
takatost
2024-03-06 13:26:14 +08:00
parent 97cdc96f7c
commit 3fc932b041
10 changed files with 233 additions and 31 deletions

View File

@ -1,7 +1,11 @@
from abc import ABC
from typing import Optional
from pydantic import BaseModel
class BaseNodeData(ABC, BaseModel):
pass
type: str
title: str
desc: Optional[str] = None

View File

@ -0,0 +1,16 @@
from decimal import Decimal
from core.workflow.entities.variable_pool import VariablePool
from models.workflow import WorkflowNodeExecution, WorkflowRun
class WorkflowRunState:
workflow_run: WorkflowRun
start_at: float
variable_pool: VariablePool
total_tokens: int = 0
total_price: Decimal = Decimal(0)
currency: str = "USD"
workflow_node_executions: list[WorkflowNodeExecution] = []