(Community): Fix Keyword argument for AzureAIDocumentIntelligenceParser (#28959)

- **Description:** Fix the `body` keyword argument for
AzureAIDocumentIntelligenceParser`
- **Issue:** #28948
This commit is contained in:
Mohammad Mohtashim 2025-01-02 21:27:12 +05:00 committed by GitHub
parent efc687a13b
commit 49a26c1fca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,7 +79,7 @@ class AzureAIDocumentIntelligenceParser(BaseBlobParser):
with blob.as_bytes_io() as file_obj: with blob.as_bytes_io() as file_obj:
poller = self.client.begin_analyze_document( poller = self.client.begin_analyze_document(
self.api_model, self.api_model,
file_obj, body=file_obj,
content_type="application/octet-stream", content_type="application/octet-stream",
output_content_format="markdown" if self.mode == "markdown" else "text", output_content_format="markdown" if self.mode == "markdown" else "text",
) )
@ -97,8 +97,7 @@ class AzureAIDocumentIntelligenceParser(BaseBlobParser):
poller = self.client.begin_analyze_document( poller = self.client.begin_analyze_document(
self.api_model, self.api_model,
AnalyzeDocumentRequest(url_source=url), body=AnalyzeDocumentRequest(url_source=url),
# content_type="application/octet-stream",
output_content_format="markdown" if self.mode == "markdown" else "text", output_content_format="markdown" if self.mode == "markdown" else "text",
) )
result = poller.result() result = poller.result()
@ -115,8 +114,7 @@ class AzureAIDocumentIntelligenceParser(BaseBlobParser):
poller = self.client.begin_analyze_document( poller = self.client.begin_analyze_document(
self.api_model, self.api_model,
analyze_request=AnalyzeDocumentRequest(bytes_source=bytes_source), body=AnalyzeDocumentRequest(bytes_source=bytes_source),
# content_type="application/octet-stream",
output_content_format="markdown" if self.mode == "markdown" else "text", output_content_format="markdown" if self.mode == "markdown" else "text",
) )
result = poller.result() result = poller.result()