mirror of
https://github.com/borbann-platform/backend-api.git
synced 2025-12-19 20:54:05 +01:00
move pydantic model file structure
This commit is contained in:
parent
93ccc23e2a
commit
6b445be016
0
pipeline/models/__init__.py
Normal file
0
pipeline/models/__init__.py
Normal file
25
pipeline/models/adapters.py
Normal file
25
pipeline/models/adapters.py
Normal 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"
|
||||||
|
)
|
||||||
Loading…
Reference in New Issue
Block a user