mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-05 12:48:12 +00:00
(Community): Fix Keyword argument for AzureAIDocumentIntelligenceParser
(#28959)
- **Description:** Fix the `body` keyword argument for AzureAIDocumentIntelligenceParser` - **Issue:** #28948
This commit is contained in:
parent
efc687a13b
commit
49a26c1fca
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user