File tree Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -152,13 +152,31 @@ class VOCRParams(TypedDict):
152152 page_range : NotRequired [List [int ]]
153153
154154
155+ class Word (TypedDict ):
156+ text : str
157+ bounds : BoundingBox
158+ confidence : float
159+
160+
161+ class Line (TypedDict ):
162+ text : str
163+ bounds : BoundingBox
164+ average_confidence : float
165+ words : List [Word ]
166+
167+
168+ class Section (TypedDict ):
169+ text : str
170+ lines : List [Line ]
171+
172+
155173class OCRResponse (BaseResponse ):
156174 context : str
157175 width : int
158176 height : int
159177 tags : List [str ]
160178 has_text : bool
161- sections : List [object ]
179+ sections : List [Section ]
162180 total_pages : Optional [int ]
163181 page_range : Optional [
164182 List [int ]
@@ -215,7 +233,9 @@ def vocr(
215233 return resp
216234
217235 @overload
218- def object_detection (self , params : ObjectDetectionParams ) -> ObjectDetectionResponse : ...
236+ def object_detection (
237+ self , params : ObjectDetectionParams
238+ ) -> ObjectDetectionResponse : ...
219239 @overload
220240 def object_detection (
221241 self , blob : bytes , options : ObjectDetectionParams = None
@@ -295,7 +315,9 @@ async def vocr(
295315 return resp
296316
297317 @overload
298- async def object_detection (self , params : ObjectDetectionParams ) -> ObjectDetectionResponse : ...
318+ async def object_detection (
319+ self , params : ObjectDetectionParams
320+ ) -> ObjectDetectionResponse : ...
299321 @overload
300322 async def object_detection (
301323 self , blob : bytes , options : ObjectDetectionParams = None
You can’t perform that action at this time.
0 commit comments