Spaces:
Sleeping
Sleeping
| from __future__ import annotations | |
| from typing import Literal, Optional | |
| from pydantic import BaseModel, Field | |
| FiveWarningType = Literal[ | |
| "不(少)看", | |
| "不(少)应", | |
| "不(少)指", | |
| "不(少)语", | |
| "不当", | |
| "时间线总览", | |
| ] | |
| class Finding(BaseModel): | |
| warning_type: FiveWarningType | |
| start_sec: float = Field(..., ge=0) | |
| end_sec: float = Field(..., ge=0) | |
| confidence: float = Field(..., ge=0.0, le=1.0) | |
| evidence: str | |
| behavior_tags: list[str] = Field(default_factory=list) | |
| clinical_note: str = "" | |
| clip_summary: str = "" | |
| modality_limit: Optional[str] = None | |
| class AgentResult(BaseModel): | |
| agent_name: str | |
| clip_start_sec: float | |
| clip_end_sec: float | |
| findings: list[Finding] = Field(default_factory=list) | |
| clip_level_summary: str = "" | |
| raw_text: str = "" | |
| class MergedEvent(BaseModel): | |
| warning_type: FiveWarningType | |
| start_sec: float | |
| end_sec: float | |
| confidence: float | |
| evidences: list[str] | |
| sources: list[str] | |
| behavior_tags: list[str] | |
| clinical_note: str = "" |