Title: feat(documents): extract with IXP models deployed to a folder by alexandrujircan · Pull Request #2004 · UiPath/uipath-python · GitHub
Open Graph Title: feat(documents): extract with IXP models deployed to a folder by alexandrujircan · Pull Request #2004 · UiPath/uipath-python
X Title: feat(documents): extract with IXP models deployed to a folder by alexandrujircan · Pull Request #2004 · UiPath/uipath-python
Description: What DocumentsServiceV2 can now extract with IXP models deployed to an Orchestrator folder. These models have their own DU Framework v2 routes (du_/api/framework/models/{name}/…), addressed by model name and folder key, and can't be reached through a project and tag. New methods on DocumentsServiceV2 only, each with an _async twin: start_model_extraction(model_name, file | file_path, folder_key=None, folder_path=None): digitizes the document, then starts the extraction. It returns a StartModelExtractionResponse. retrieve_model_extraction_result(start_response): checks once. It raises OperationNotCompleteException while the extraction runs, and OperationFailedException if it failed. extract_with_model(...): start_model_extraction, then retrieve_model_extraction_result until the result is ready. It returns a ModelExtractionResponse. response = UiPath().documents_v2.extract_with_model( model_name="invoices-ixp", file_path="invoice.pdf", folder_path="Shared/Invoices", ) How the methods pick the folder: Order: folder_key first. Otherwise folder_path, whose key is looked up. Otherwise the job's folder (UIPATH_FOLDER_KEY, then UIPATH_FOLDER_PATH). Errors: they raise ValueError when no folder is available, when both a key and a path are given, or when the key isn't a GUID. Why a key: these routes accept only a GUID folder key, not a folder path. model_name is the model's URL name (for example invoices-08963f00-ixp), not its display name. It gets the same encoding and ./.. checks as the project routes. UiPath().documents (API v1.1) is unchanged. Why separate methods instead of new extract parameters Folder models differ from projects in more than how they are addressed: extraction is async only, and there is no classification; results have no data projection, and nothing in them identifies the model; validation is a separate flow. Separate response types also mean a folder-model result can't be passed by mistake to the project-based validation methods or resume triggers, which build project and tag URLs. The start/retrieve pair is what resume triggers will need. The blocking method is built on that pair, so there is one code path. Follow-ups Validation of folder-model extractions, ported from #1934. Resume triggers for folder-model extractions. How it was tested Unit tests in test_documents_service_v2.py, sync and async: the full flow, including the folder key header and the uploaded file; PascalCase responses; folder resolution from an explicit path, the job folder key and the job folder path; invalid arguments: no folder, both a key and a path, a key that isn't a GUID, and dot or empty model names; the start/retrieve pair, with the start response rebuilt from JSON as triggers will do; failed and timed-out extractions; documents (v1.1) doesn't get the new methods. uipath-platform suite: 2301 passed. ruff and mypy are clean. Live on alpha, with models deployed to a personal workspace folder: Scenario Result Sync, folder_key Extracted in about 11 s Async, folder_path The path resolved to its key, then extracted Start, then retrieve, with the job folder from UIPATH_FOLDER_KEY Not complete twice, then the result Model with a field group Values with v2 field IDs, e.g. Default.details.name Unknown model, or the right model in another folder OperationFailedException with ModelNotFoundError Unknown folder key 403 FolderAccessForbiddenError Unknown folder path FolderNotFoundException, before any DU request Known issue (not new): a document passed as raw bytes is rejected with UnsupportedContentTypeError, because it is uploaded without a file name or content type. The existing extract behaves the same way on both API versions. A file path or an open file works. This will be fixed separately. uipath-platform 0.3.10 → 0.3.11. Ported from #1933 by Thomas Lammers, which this replaces. 🤖 Generated with Claude Code
Open Graph Description: What DocumentsServiceV2 can now extract with IXP models deployed to an Orchestrator folder. These models have their own DU Framework v2 routes (du_/api/framework/models/{name}/…), addressed by mode...
X Description: What DocumentsServiceV2 can now extract with IXP models deployed to an Orchestrator folder. These models have their own DU Framework v2 routes (du_/api/framework/models/{name}/…), addressed by mode...
Opengraph URL: https://github.com/UiPath/uipath-python/pull/2004
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:36ffddf8-d54d-fdf7-e5ac-f0a4146f5959 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9B58:28E7AF:13C9E6:1B4294:6AFF60F2 |
| html-safe-nonce | 1b146a60b29cbe0ce3fd332b6541fc0a05b71f3d3efc46e6a348ef149f4c04e7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjU4OjI4RTdBRjoxM0M5RTY6MUI0Mjk0OjZBRkY2MEYyIiwidmlzaXRvcl9pZCI6Ijc4NjMxMjQ3ODc1NTg1NzIyNzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5415424571ae85ecd3fbaeb03ba19d8d1fcfd305b8c157cc85e7405c3f3b22b9 |
| hovercard-subject-tag | pull_request:5391017371 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/UiPath/uipath-python/pull/2004/files |
| twitter:image | https://avatars.githubusercontent.com/u/138583433?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/138583433?s=400&v=4 |
| og:image:alt | What DocumentsServiceV2 can now extract with IXP models deployed to an Orchestrator folder. These models have their own DU Framework v2 routes (du_/api/framework/models/{name}/…), addressed by mode... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2422ccd4bc783f932948cce4871cb9e0622bab749db07f387c9631b7e6834d1f |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/UiPath/uipath-python git https://github.com/UiPath/uipath-python.git |
| octolytics-dimension-user_id | 375663 |
| octolytics-dimension-user_login | UiPath |
| octolytics-dimension-repository_id | 925171912 |
| octolytics-dimension-repository_nwo | UiPath/uipath-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 925171912 |
| octolytics-dimension-repository_network_root_nwo | UiPath/uipath-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2a39546baeb98186e651a01d5d7aa6465825eeb1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width