Skip to content

feat: document_url support local path#22

Merged
MingruiZhang merged 2 commits intomainfrom
document_url_support_local
Sep 25, 2025
Merged

feat: document_url support local path#22
MingruiZhang merged 2 commits intomainfrom
document_url_support_local

Conversation

@MingruiZhang
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings September 25, 2025 08:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for local file paths in document_url and markdown_url parameters by automatically converting them to file parameters when they reference existing local files.

  • Adds a utility function to detect and convert local file paths to file objects
  • Integrates the conversion logic into both sync and async extract/parse methods
  • Maintains backward compatibility by preserving remote URLs unchanged

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/landingai_ade/lib/url_utils.py New utility module with URL-to-file conversion logic
src/landingai_ade/_client.py Integration of URL conversion in client methods

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/landingai_ade/lib/url_utils.py
Comment thread src/landingai_ade/lib/url_utils.py
Comment thread src/landingai_ade/lib/url_utils.py Outdated
@MingruiZhang MingruiZhang merged commit 5da57a5 into main Sep 25, 2025
7 checks passed
@stainless-app stainless-app Bot mentioned this pull request Sep 25, 2025
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.

2 participants