Spaces:
Running
Running
| from typing import TypedDict, List | |
| import operator | |
| from typing_extensions import Annotated | |
| from langchain_core.messages import AnyMessage | |
| from agents.auditor import AuditIssue, GlobalAuditOutput | |
| def merge_dicts(a: dict, b: dict) -> dict: | |
| return {**(a or {}), **(b or {})} | |
| class AuditorPanelState(TypedDict): | |
| project_id: str | |
| program_name: str | |
| content: str | |
| is_external_audit: bool | |
| # Agregacja b艂臋d贸w z poszczeg贸lnych r贸l | |
| issues: Annotated[List[AuditIssue], operator.add] | |
| perspectives_summary: Annotated[dict, merge_dicts] | |
| # Przechowuje scores do finalnego u艣rednienia | |
| perspective_scores: Annotated[List[int], operator.add] | |
| # Zarz膮dzanie Dynamic Query Routing dla Prawnika | |
| legal_attempts: int | |
| legal_queries: Annotated[List[str], operator.add] | |
| messages: Annotated[ | |
| List[AnyMessage], operator.add | |
| ] # s艂u偶y do wymiany zapyta艅 z narz臋dziami prawnika | |
| prawnik_done: bool | |
| # Zarz膮dzanie Dynamic Query Routing dla Finansisty | |
| finansista_attempts: int | |
| finansista_queries: Annotated[List[str], operator.add] | |
| finansista_messages: Annotated[List[AnyMessage], operator.add] | |
| finansista_done: bool | |
| # Zarz膮dzanie Dynamic Query Routing dla Innowatora | |
| innowator_attempts: int | |
| innowator_queries: Annotated[List[str], operator.add] | |
| innowator_messages: Annotated[List[AnyMessage], operator.add] | |
| innowator_done: bool | |
| # Wynik ko艅cowy (wyliczony przez Zarz膮dzaj膮cego) | |
| final_output: GlobalAuditOutput | |