Enhance README with detailed service description, setup instructions, and example .env configuration for the FastAPI service that integrates with Paperless-ngx and llama.cpp for PDF processing.

This commit is contained in:
2026-03-31 14:29:50 -05:00
parent facf6b26f0
commit 9b1705d82b
7 changed files with 699 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
from __future__ import annotations
from notebook_tools.paperless_client import _document_id_from_task_payload
def test_related_document_string() -> None:
assert (
_document_id_from_task_payload(
{
"related_document": "10",
"result": "Success. New document id 10 created",
}
)
== 10
)
def test_result_string_only() -> None:
assert (
_document_id_from_task_payload(
{"related_document": None, "result": "Success. New document id 42 created"}
)
== 42
)
def test_related_document_int() -> None:
assert _document_id_from_task_payload({"related_document": 7}) == 7