Skip to content

Commit 5e5c5f2

Browse files
committed
fix: improve document processing pipeline and UI
- Make validation and routing stages resilient (continue with defaults on failure) - Improve quality score and routing decision extraction from database - Add comprehensive logging for debugging invoice field extraction - Remove Invoice Details section from Document Results page - Add processing_summary to DocumentResults interface - Enhance field extraction logic with better fallbacks - Save validation and routing extraction results to database
1 parent 0454817 commit 5e5c5f2

7 files changed

Lines changed: 2305 additions & 288 deletions

File tree

src/api/agents/document/action_tools.py

Lines changed: 555 additions & 21 deletions
Large diffs are not rendered by default.

src/api/routers/document.py

Lines changed: 335 additions & 45 deletions
Large diffs are not rendered by default.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
"""Document processing services."""
17+
18+
from .document_db_service import DocumentDBService, get_document_db_service
19+
from .retry_handler import retry_with_backoff, retryable, RetryConfig, CircuitBreaker
20+
from .job_queue import JobQueue, JobStatus, get_job_queue
21+
22+
__all__ = [
23+
"DocumentDBService",
24+
"get_document_db_service",
25+
"retry_with_backoff",
26+
"retryable",
27+
"RetryConfig",
28+
"CircuitBreaker",
29+
"JobQueue",
30+
"JobStatus",
31+
"get_job_queue",
32+
]
33+

0 commit comments

Comments
 (0)