Skip to content

Conversation

@ehcalabres
Copy link

Background

While using DocumentLoader with LangChain, I noticed that although pathlib.Path and docling.datamodel.base_models.DocumentStream are supported input types in Docling, the loader here only accepted a string (representing either a file path or URL). This limitation made the integration less flexible and somewhat inconvenient.

Changes

This PR adds support for both DocumentStream and pathlib.Path as input types, allowing docling-langchain to align more closely with the Docling API for document loading.

Breaking Changes

To reflect this input change, the file_path parameter has been renamed to source, consistent with the naming used in the Docling converter interface.

@mergify
Copy link

mergify bot commented Apr 12, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 Require two reviewer for test updates

This rule is failing.

When test data is updated, we require two reviewers

  • #approved-reviews-by >= 2

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@ehcalabres ehcalabres force-pushed the feat/add-document-stream-and-path-support branch from 151ac47 to dec49f0 Compare April 12, 2025 09:41
@ehcalabres ehcalabres force-pushed the feat/add-document-stream-and-path-support branch from dec49f0 to 754eddb Compare April 12, 2025 09:46
@mergify
Copy link

mergify bot commented Sep 9, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 Require two reviewer for test updates

This rule is failing.

When test data is updated, we require two reviewers

  • #approved-reviews-by >= 2

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant