forked from interviewstreet/hackerrank-orchestrate-june26
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.py
More file actions
53 lines (42 loc) · 1.32 KB
/
Copy pathschema.py
File metadata and controls
53 lines (42 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"""Pydantic schemas for the VLM claim-analysis pipeline.
Mirrors ``specs/agent_contract.md`` §1 and ``specs/data_contract.md`` §3.
These models are the typed boundary between the model output and the
postprocessor.
"""
from pydantic import BaseModel
class ClaimAnalysis(BaseModel):
"""Pass 2 multimodal output. Every field the model is asked to produce."""
evidence_standard_met: bool
evidence_standard_met_reason: str
risk_flags: str
issue_type: str
object_part: str
claim_status: str
claim_status_justification: str
supporting_image_ids: str
valid_image: bool
severity: str
class ClaimIntentExtraction(BaseModel):
"""Pass 1 text-only output."""
claimed_damage_description: str
issue_family: str
claimed_object_part: str
class PipelineResult(BaseModel):
"""Final, postprocessor-validated row written to output.csv.
Mirrors ``config.OUTPUT_COLUMNS`` exactly (tests assert every column is
present in ``model_dump()``).
"""
user_id: str
image_paths: str
user_claim: str
claim_object: str
evidence_standard_met: bool
evidence_standard_met_reason: str
risk_flags: str
issue_type: str
object_part: str
claim_status: str
claim_status_justification: str
supporting_image_ids: str
valid_image: bool
severity: str