Spaces:
Sleeping
Sleeping
File size: 1,028 Bytes
56257d2 | 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 | from typing import List, Optional
from pydantic import BaseModel
class Document(BaseModel):
"""A document to be audited (e.g., privacy policy)."""
id: str
title: str
content: str
doc_type: str
class DataPractice(BaseModel):
"""A data practice extracted from real operations."""
id: str
category: str
purpose: str
data_type: str
shared_with_third_parties: bool = False
class Observation(BaseModel):
"""Observation returned by the environment after reset/step."""
task_id: str
task_name: str
difficulty: str
step: int
documents: List[Document]
data_practices: List[DataPractice]
compliance_requirements: List[str]
flagged_issues: List[str]
echoed_message: str
class Action(BaseModel):
"""Action submitted by the agent — a compliance finding."""
message: str
class Reward(BaseModel):
"""Reward structure with partial progress signals."""
value: float
reason: str
issues_found: int = 0
total_issues: int = 0
|