@@ -79,7 +79,7 @@ def lazy_parse(self, blob: Blob) -> Iterator[Document]:
7979 with blob .as_bytes_io () as file_obj :
8080 poller = self .client .begin_analyze_document (
8181 self .api_model ,
82- file_obj ,
82+ body = file_obj ,
8383 content_type = "application/octet-stream" ,
8484 output_content_format = "markdown" if self .mode == "markdown" else "text" ,
8585 )
@@ -97,8 +97,7 @@ def parse_url(self, url: str) -> Iterator[Document]:
9797
9898 poller = self .client .begin_analyze_document (
9999 self .api_model ,
100- AnalyzeDocumentRequest (url_source = url ),
101- # content_type="application/octet-stream",
100+ body = AnalyzeDocumentRequest (url_source = url ),
102101 output_content_format = "markdown" if self .mode == "markdown" else "text" ,
103102 )
104103 result = poller .result ()
@@ -115,8 +114,7 @@ def parse_bytes(self, bytes_source: bytes) -> Iterator[Document]:
115114
116115 poller = self .client .begin_analyze_document (
117116 self .api_model ,
118- analyze_request = AnalyzeDocumentRequest (bytes_source = bytes_source ),
119- # content_type="application/octet-stream",
117+ body = AnalyzeDocumentRequest (bytes_source = bytes_source ),
120118 output_content_format = "markdown" if self .mode == "markdown" else "text" ,
121119 )
122120 result = poller .result ()
0 commit comments