Using document_intelligence_client.begin_analyze_document returns Session.request() got an unexpected keyword argument 'body'
When I'm trying to use the following script:
# Open local file in binary mode
with open(file_path, "rb") as f:
poller = document_intelligence_client.begin_analyze_document(
model_id="prebuilt-layout",
body=f
)
I get the error:
Session.request() got an unexpected keyword argument 'body'
I've checked the version: Version: 1.0.0
and in case tried updating it with pip. It still returns the same error.
The key and endpoint are correct.
In essence, I want to use local PDF files and use document intelligence to retrieve the text and tables, maybe even figures later if I can figure this out first. I have a custom extraction model, but I'm just trying to test this first to see if everything is in order.
I've tried changing
body=f -> document=f
but the error just changes to
Session.request() got an unexpected keyword argument 'document'