Skip to content

Make Docling dependencies optional #18

Closed

Description

@FullFran

Problem

The project requires heavyweight Docling dependencies for the whole environment, even when ingestion is not used. This slows setup, increases install size, and makes basic RAG usage unnecessarily heavy.

Goal

Decouple Docling (and related OCR/ML libs) so they are optional and only required for ingestion workflows. Core RAG/chat/search should run without Docling installed.

Ideas

  • Move Docling-related deps into an optional dependency group (e.g. dependency-groups.docling or extra in pyproject.toml).
  • Gate Docling imports behind feature flags or lazy imports in ingestion module.
  • Provide clear error message when ingestion is invoked without Docling extras.
  • Document optional install in README (e.g. uv sync --group docling).

Acceptance Criteria

  • Base install does not pull Docling/ML/OCR deps.
  • Ingestion works when optional deps are installed.
  • Running chat/search without optional deps does not fail.

Activity

  1. FullFran commented on Jan 26, 2026

    @FullFran
    OwnerAuthor

    Plan de acción inmediato

    Priorizamos velocidad. Los tests de RAG/Agent no necesitan Docling.

    Paso 1: Separar dependencias

    • Mover docling, docling-core, transformers, openai-whisper a grupo opcional ingestion.
    • Core RAG solo necesita: pydantic, openai, supabase, pymongo, rich.

    Paso 2: Gate imports

    • En src/infrastructure/ingestion/ hacer lazy import con error claro si falta.

    Paso 3: Documentar

    • README: uv sync para core, uv sync --group ingestion para ingest.

    Esto nos permite correr tests sin esperar 2GB de CUDA/torch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions