Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,4 @@ TODO.md
doc-deploy/
todos/
*.egg-info/
*.rdb
14 changes: 13 additions & 1 deletion apps/worker/app/services/document_agent/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
"""Page anatomy agent for hierarchy-first PDF profiling."""

from typing import TYPE_CHECKING

from app.services.document_agent.manifest import (
PageAnatomyMap,
PageFeature,
PageLabel,
ShardPlan,
)
from app.services.document_agent.profile_agent import ProfileAgent

if TYPE_CHECKING:
from app.services.document_agent.profile_agent import ProfileAgent


def __getattr__(name: str):
if name == "ProfileAgent":
from app.services.document_agent.profile_agent import ProfileAgent

return ProfileAgent
raise AttributeError(name)

__all__ = [
"PageAnatomyMap",
Expand Down
1 change: 1 addition & 0 deletions apps/worker/app/services/document_agent/budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"toc_confirm",
"coarse_planner",
"structural_react",
"page_locate",
"page_tagging",
]

Expand Down
6 changes: 6 additions & 0 deletions apps/worker/app/services/document_agent/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ def __init__(
),
cap=int(os.environ.get("PARSE_AGENT_STRUCTURAL_REACT_CAP", "64000")),
),
"page_locate": StageEnvelope(
min_guarantee=int(
os.environ.get("PARSE_AGENT_PAGE_LOCATE_MIN_BUDGET", "0")
),
cap=int(os.environ.get("PARSE_AGENT_PAGE_LOCATE_CAP", "0")) or None,
),
"page_tagging": StageEnvelope(
min_guarantee=int(
os.environ.get("PARSE_AGENT_PAGE_TAGGING_MIN_BUDGET", "0")
Expand Down
2 changes: 2 additions & 0 deletions apps/worker/app/services/document_agent/structure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"""Shared document-structure helpers for profile-time anatomy."""

Loading
Loading