File size: 824 Bytes
f1164d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from __future__ import annotations

from typing import Any, Protocol


class VisionCaptioner(Protocol):
    def generate_caption(self, image_path: str, found_location: str = "", staff_note: str = "") -> dict[str, str]:
        ...


class TextReasoner(Protocol):
    # Staff-side matching and message drafting are required of every adapter.
    # The claimant conversation is real-mode only: MiniCPM5 additionally
    # implements ``claim_chat(conversation, user_message, guidance)``. Mock mode
    # answers from the deterministic planner in ``conversation.plan_turn``; see
    # services.claim_chat_step.
    def match_claim(self, claim: dict[str, Any], items: list[dict[str, Any]]) -> dict[str, Any]:
        ...

    def draft_message(self, claim: dict[str, Any], item: dict[str, Any] | None = None) -> str:
        ...