satomitheito's picture
Add new agents and observability, fix sys.path for HF Space
3487f22
from typing import TypedDict, List
class Clause(TypedDict, total=False):
id: int
text: str
section: str
clause_type: str
confidence: float
risk_score: float
risk_factors: List[str]
benchmark_similarity: float
benchmark_source: str
class ContractState(TypedDict, total=False):
raw_text: str
clauses: List[Clause]
classified_clauses: List[Clause]
risk_scores: List[Clause]
benchmark_results: List[Clause]
report: str
# New, knowledge Graph:
entities: List[dict]
relationships: List[dict]
graph_image_path: str # path to saved knowledge graph PNG