WIP
This commit is contained in:
7
utils.py
7
utils.py
@@ -1,10 +1,10 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Literal, Any
|
||||
from pydantic import BaseModel
|
||||
import subprocess
|
||||
|
||||
|
||||
@dataclass
|
||||
class Event:
|
||||
class Event(BaseModel):
|
||||
"""Event within the timeline"""
|
||||
|
||||
id: int
|
||||
@@ -25,8 +25,7 @@ class Event:
|
||||
payload: str | None
|
||||
"""Payload of the event. `None` for `voice`, image path for `vis`, OCR result for `ocr`"""
|
||||
|
||||
@dataclass
|
||||
class Timeline:
|
||||
class Timeline(BaseModel):
|
||||
"""Timeline of events"""
|
||||
|
||||
events: list[Event]
|
||||
|
||||
Reference in New Issue
Block a user