Files
parsing-service/requirements-runtime.txt
VinhNT c79ea9f05f Nhận PDF upload trực tiếp qua POST /parse
API trước đây chỉ nhận đường dẫn HDFS từ Airflow. Thêm endpoint
multipart/form-data nhận thẳng file PDF, vẫn chạy bất đồng bộ: trả 202 kèm
job_id và result_url, worker xử lý nền, client lấy dla-document-bundle ở
GET /jobs/{job_id}/result hoặc qua callback.

- File upload ghi xuống IDP_DATA_DIR/uploads theo sha256 nội dung nên gửi lại
  cùng request_id trả cùng job_id; file được xoá khi không còn job nào dùng.
- Thêm cột filename/source_kind để bundle giữ đúng tên file gốc thay vì tên
  đã băm.
- IDP_RUN_WORKER=1 chạy worker trong process API cho triển khai một host.
- IDP_OCR_BACKEND=pdf_text dựng bundle từ text layer của PDF để chạy thử toàn
  bộ luồng khi chưa serve được model.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-21 14:51:19 +00:00

57 lines
1.0 KiB
Plaintext

annotated-doc==0.0.5
# via fastapi
annotated-types==0.8.0
# via pydantic
anyio==4.15.1
# via starlette
certifi==2026.7.22
# via requests
charset-normalizer==3.5.1
# via requests
click==8.5.0
# via uvicorn
docopt==0.6.2
# via hdfs
fastapi==0.141.1
# via idp-parsing-service
h11==0.16.0
# via uvicorn
hdfs==2.7.3
# via idp-parsing-service
idna==3.19
# via
# anyio
# requests
pycryptodome==3.23.0
# via idp-parsing-service
pydantic==2.13.5
# via fastapi
pydantic-core==2.46.5
# via pydantic
pymupdf==1.28.2
# via idp-parsing-service
python-multipart==0.0.32
# via idp-parsing-service
requests==2.34.2
# via hdfs
six==1.17.0
# via hdfs
starlette==1.6.0
# via fastapi
typing-extensions==4.16.0
# via
# anyio
# fastapi
# pydantic
# pydantic-core
# starlette
# typing-inspection
typing-inspection==0.4.4
# via
# fastapi
# pydantic
urllib3==2.8.0
# via requests
uvicorn==0.53.0
# via idp-parsing-service