move pydantic model file structure

This commit is contained in:
Sosokker 2025-05-12 15:10:48 +07:00
parent 93ccc23e2a
commit 6b445be016
3 changed files with 25 additions and 0 deletions

View File

View File

@ -0,0 +1,25 @@
from typing import Any
from pydantic import BaseModel, Field
class AdapterRecord(BaseModel):
"""
Record output from each adapter.
"""
source: str = Field(..., description="Source type")
data: dict[str, Any] = Field(..., description="Data output from the adapter")
class OutputData(BaseModel):
"""
Output data from a pipeline run.
"""
records: list[AdapterRecord] = Field(..., description="List of adapter records")
unified: bool | None = Field(
default=False, description="Whether the records are unified"
)
metadata: dict[str, Any] | None = Field(
default=None, description="Metadata about the run"
)