Spaces:
Paused
Paused
File size: 732 Bytes
26fe5b4 | 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 | from pydantic import BaseModel
from typing import Optional
class Question(BaseModel):
text: str
file_path: Optional[str] = None
file_type: Optional[str] = None
class PlanStep(BaseModel):
step_id: int
action: str
tool: str
input: str
class Plan(BaseModel):
question: str
task_type: str
steps: list[PlanStep]
class Evidence(BaseModel):
source: str
facts: list[str]
confidence: str # high, medium, low
class Answer(BaseModel):
raw: str
normalized: str
verification: str # PASS or FAIL: reason
class Trace(BaseModel):
task_id: str
question: str
plan: Plan
evidences: list[Evidence]
answer: Answer
tool_calls: int
duration_ms: int
|