You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/community/langchain_community/document_loaders/parsers
Edwin Wenink 9fb09c1c30
community: fix the "page" mode in the AzureAIDocumentIntelligenceParser (bug) (#15958)
**Description**: the "page" mode in the
AzureAIDocumentIntelligenceParser is not accessible due to a wrong
membership test. The mode argument can only be a string (also see the
assertion in the `__init__`: `assert self.mode in ["single", "page",
"object", "markdown"]`, so the check `elif self.mode == ["page"]:`
always fails.
As a result, effectively the "object" mode is used when selecting the
"page" mode, which may lead to errors.

The docstring of the `AzureAIDocumentIntelligenceLoader` also ommitted
the `mode` parameter alltogether, so I added it.

**Issue**: I could not find a related issue (this class is only 3 weeks
old anyways)

**Dependencies**: this PR does not introduce or affect dependencies.

The current demo notebook and examples are not affected because they all
use the default markdown mode.
8 months ago
..
html community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 10 months ago
language community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 10 months ago
__init__.py community[minor]: Azure DocumentIntelligenceLoader/Parser support update with latest SDK (#14389) 9 months ago
audio.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 10 months ago
doc_intelligence.py community: fix the "page" mode in the AzureAIDocumentIntelligenceParser (bug) (#15958) 8 months ago
docai.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 10 months ago
generic.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 10 months ago
grobid.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 10 months ago
msword.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 10 months ago
pdf.py docs, experimental[patch], langchain[patch], community[patch]: update storage imports (#15429) 9 months ago
registry.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 10 months ago
txt.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 10 months ago