from pydantic import BaseModel from typing import List, Optional class OCRData(BaseModel): text: str bbox: List[List[int]] # 这里使用 List[List[int]] 来表示多个坐标点 confidence: float class OCRResponse(BaseModel): success: bool error: Optional[str] message: Optional[str] data: Optional[List[OCRData]] = []