Repository navigation
Releases
Releases · novatechflow/docai
v0.2.1
Fixed
docai-ingestnames each Markdown file<pdf name>-<hash>.md, where the hash comes from the full PDF path. Two PDFs with the same file name in different folders were written to the same<pdf name>.md, so the second one was skipped and never indexed. Markdown written by earlier versions is not reused, so the first run after upgrading OCRs every PDF again.docai-classifykeeps.txtand.mdfiles when neitherpython-magicnor thefilecommand is available. The built-in signature sniff has no signature for plain text, so these files were quarantined ascontent type undetermined. A.txtor.mdfile with no NUL bytes in its first 8 KB is now treated astext/plain.
Upgrade notes
- The first run of
docai-ingestafter upgrading OCRs every PDF again, because Markdown files written by 0.2.0 under the old<pdf name>.mdname are not reused.
Documentation
- The README and package metadata match the code. The project URL points to
github.com/novatechflow/docai, the description names OpenAI-compatible and custom OCR endpoints, and the classifiers list Python 3.14, which CI tests and the Docker image uses. - The README shows how to keep only the PDFs from the
docai-classify--doc-listbefore passing it todocai-ingest. - The README Docker example runs
docai_toolkit.classifyinstead ofpytest, which the image does not include. The test section lists the commands CI runs. - The case study section that described DOCX loading and text cleaning was removed, because the code does neither.
v0.2.0
Changed
- Remote generation and embeddings now speak the OpenAI REST API (
/v1/chat/completions,/v1/embeddings) instead of the Hugging Face payload format, so any OpenAI-compatible server — Ollama, vLLM, llama.cpp, TGI, or a hosted gateway — works through one client. Endpoints are the server's/v1base URL; the model field is the served model name. docai_toolkit.hf_clientis replaced bydocai_toolkit.http_client, which exposes a scheme-guardedHttpClientand anOpenAIClient(chat/embed).RemoteEmbeddingstakes amodeland calls/v1/embeddings;chat_over_corpussends chat messages and exposeskfor retrieval depth.- Local generation uses
HuggingFacePipeline.invokeinstead of the deprecated call form. RemoteOcrClientposts the raw PDF to a custom OCR endpoint (unchanged wire format; OCR has no OpenAI-standard route).- README documents Ollama (laptop/Apple Silicon) and vLLM (NVIDIA/batch) as the blessed local runners.
Added
EmbeddingConfig.deviceis now honoured for local embeddings:SentenceTransformerEmbeddingsresolves"auto"to CUDA, then Apple Metal (MPS), then CPU (or an explicitcpu/cuda/mps), andbuild_index_from_markdownforwards it. The knob previously existed but was ignored.docai_toolkit.ingestand thedocai-ingestCLI: OCR PDFs concurrently, then build a FAISS index in batches with periodic checkpoints and a ledger, so a re-run resumes without re-embedding already-indexed files. Failures on individual PDFs are recorded, not fatal. Consumes the--doc-listfromdocai-classify.docai_toolkit.classifyand thedocai-classifyCLI: recursively triage a file tree into documents / non-documents / quarantine, verifying each file by both extension and detected content type so mislabelled or renamed binaries do not slip through. Emits a JSON manifest and a kept-document list. Content detection preferspython-magic(newclassifyextra), then thefilecommand, then a built-in signature sniff.
Fixed
- Chat with Docs is wired up again: the question is asked before the worker starts, and the worker now retrieves, generates, and shows the answer instead of discarding the index.
- RAG imports work with langchain >= 0.2 (
langchain_text_splitters/langchain_core.embeddings); indexing previously failed with "langchain is required" even when langchain was installed. - Local embeddings go through a
SentenceTransformerEmbeddingsadapter, so the default (endpoint-less) index path no longer hands a rawSentenceTransformerto FAISS. load_indextakes the embeddings it needs and an explicitallow_dangerous_deserializationopt-in; it previously raised unconditionally.- Worker threads report status through
root.afterinstead of touching Tk directly. - Default OCR provider is
tesseract; the unimplementeddeepseekdefault made OCR fail out of the box. - Malformed or outdated
~/.docai/config.jsonfalls back to defaults instead of crashing at startup. - Remote embedding batches are length-checked, and the per-text fallback no longer swallows transport errors.
pyproject.tomlversion matches the changelog.
Security
- Endpoints are restricted to
https(andhttpon localhost); arbitrary schemes such asfile://previously turned an endpoint call into a local file read, andhttp://sent the bearer token in cleartext. ~/.docai/config.jsonis written0600inside a0700directory, and a token sourced from the environment is no longer persisted to it. The Settings token field is masked.
Removed
DeepSeekOcrClientplaceholder and the unusedOcrConfig.model/ OCR Model setting.
Dependencies
- Split dependencies into
ocr,rag,llm,allanddevextras so the viewer no longer pulls in torch, bitsandbytes and faiss;pytestmoved out of the runtime dependency set. requirements.txtis now an exact-pinned set used by the Docker image, and version ranges inpyproject.tomlare bounded.- Replaced the retired
PyPDF2with its maintained successorpypdf. - Raised the floor to Python 3.11 and added a
pytestmatrix over 3.11, 3.12, 3.13 and 3.14; the Docker base image moves topython:3.14-slim, pinned by digest. - Added a
[build-system]table and PEP 639 license metadata. - The
docai-viewerconsole script works from an installed wheel:pdf_viewer_appwas never packaged, so the entry point could only fail withModuleNotFoundError.
CI
- Added Dependabot for pip, GitHub Actions and Docker, with auto-merge for non-major updates and a comment on major ones.
- Pinned every third-party action to a commit SHA.
- Release notes now contain only the section for the tag being released instead of the entire changelog.
v0.1.3.1
Changelog
0.1.3.1
Changed
- pypi push fixed
- project URL fixed
0.1.3
Added
- Docker workflow now pushes images only on tags and publishes to GHCR (optional Docker Hub) with tag-based naming.
- PyPI workflow now only runs on tags, syncs version from tag, and skips existing uploads.
- GitHub Release automation on tagged pushes (uses changelog as body).
Changed
- Fixed YAML indentation in workflows to satisfy GitHub Actions parser.
0.1.2
Added
- GHCR publishing in Docker workflow and tag-only image pushes; PyPI workflow syncs version from tag and skips existing uploads.
- Docker image runs as non-root, includes Tk/ocr deps, and README documents macOS XQuartz steps for GUI in Docker.
Changed
- Default Docker CMD launches the viewer; README clarifies active development, HF onboarding, and Docker usage.
0.1.0
Added
- New
docai_toolkitpackage with OCR (local Tesseract or remote endpoint), embeddings/indexing (local or remote), and chat over FAISS. - GUI updates: OCR → Markdown flow, chat with docs, settings persistence to
~/.docai/config.json, background threads for OCR/chat, and HF/custom endpoint support. - Dockerfile (non-root) and GitHub Actions workflows for Docker build and PyPI trusted publishing.
pyproject.tomlpackaging with console entrypointdocai-viewer.- Tests for PDF writer, remote OCR parsing, and remote embeddings.
Changed
- Renamed from
docaitodocai_toolkitto avoid PyPI naming conflicts. - Hardened HF client (timeouts/errors), safer FAISS load (no dangerous deserialization), and remote embedding batching.
- README refresh with install, HF onboarding, Docker/XQuartz instructions, and macOS GUI notes.
Removed
- Legacy training scripts and legacy
pdf_ui.pyentrypoint.
v0.1.3
Changelog
Changelog
0.1.3
Added
- Docker workflow now pushes images only on tags and publishes to GHCR (optional Docker Hub) with tag-based naming.
- PyPI workflow now only runs on tags, syncs version from tag, and skips existing uploads.
- GitHub Release automation on tagged pushes (uses changelog as body).
Changed
- Fixed YAML indentation in workflows to satisfy GitHub Actions parser.
0.1.2
Added
- GHCR publishing in Docker workflow and tag-only image pushes; PyPI workflow syncs version from tag and skips existing uploads.
- Docker image runs as non-root, includes Tk/ocr deps, and README documents macOS XQuartz steps for GUI in Docker.
Changed
- Default Docker CMD launches the viewer; README clarifies active development, HF onboarding, and Docker usage.
0.1.0
Added
- New
docai_toolkitpackage with OCR (local Tesseract or remote endpoint), embeddings/indexing (local or remote), and chat over FAISS. - GUI updates: OCR → Markdown flow, chat with docs, settings persistence to
~/.docai/config.json, background threads for OCR/chat, and HF/custom endpoint support. - Dockerfile (non-root) and GitHub Actions workflows for Docker build and PyPI trusted publishing.
pyproject.tomlpackaging with console entrypointdocai-viewer.- Tests for PDF writer, remote OCR parsing, and remote embeddings.
Changed
- Renamed from
docaitodocai_toolkitto avoid PyPI naming conflicts. - Hardened HF client (timeouts/errors), safer FAISS load (no dangerous deserialization), and remote embedding batching.
- README refresh with install, HF onboarding, Docker/XQuartz instructions, and macOS GUI notes.
Removed
- Legacy training scripts and legacy
pdf_ui.pyentrypoint.
v0.1.0
Full Changelog: https://github.com/2pk03/docai/blob/main/CHANGELOG.md