Files
mistral-vibe/vibe/core/nuage/workflow.py
Clément Drouin 90763daf81 v2.7.3 (#564)
Co-authored-by: Bastien <bastien.baret@gmail.com>
Co-authored-by: Laure Hugo <201583486+laure0303@users.noreply.github.com>
Co-authored-by: Michel Thomazo <51709227+michelTho@users.noreply.github.com>
Co-authored-by: Paul Cacheux <paul.cacheux@mistral.ai>
Co-authored-by: Val <102326092+vdeva@users.noreply.github.com>
Co-authored-by: Mistral Vibe <vibe@mistral.ai>
2026-04-03 15:56:50 +02:00

46 lines
1.1 KiB
Python

from __future__ import annotations
from datetime import datetime
from enum import StrEnum
from typing import Any
from pydantic import BaseModel, Field
class WorkflowExecutionStatus(StrEnum):
RUNNING = "RUNNING"
COMPLETED = "COMPLETED"
FAILED = "FAILED"
CANCELED = "CANCELED"
TERMINATED = "TERMINATED"
CONTINUED_AS_NEW = "CONTINUED_AS_NEW"
TIMED_OUT = "TIMED_OUT"
RETRYING_AFTER_ERROR = "RETRYING_AFTER_ERROR"
class WorkflowExecutionWithoutResultResponse(BaseModel):
workflow_name: str
execution_id: str
parent_execution_id: str | None = None
root_execution_id: str = ""
status: WorkflowExecutionStatus | None = None
start_time: datetime
end_time: datetime | None = None
total_duration_ms: int | None = None
class WorkflowExecutionListResponse(BaseModel):
executions: list[WorkflowExecutionWithoutResultResponse] = Field(
default_factory=list
)
next_page_token: str | None = None
class SignalWorkflowResponse(BaseModel):
message: str = "Signal accepted"
class UpdateWorkflowResponse(BaseModel):
update_name: str = ""
result: Any = None