Skip to content
Open
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
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ __pycache__
*.pyc
**/__pycache__
**/*.pyc
venv
.venv
**/venv
**/.venv

# System-specific files
.DS_Store
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to
- ⬆️(dependencies) update back and front dependencies
- 💄(ui) new header
- ✨(back) add debug mode setup for local development
- ⬆️(dependencies) switch base docker image to upgrade markitdown

### Fixed

Expand All @@ -33,7 +34,7 @@ and this project adheres to

- ⬆️(dependencies) upgrade Next.js 15 to 16, upgrade python dependencies
- ✨(front) rich text copy for Word/Docs paste

### Fixed

- 🐛(back) add missing color option for project colors
Expand Down
53 changes: 29 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Django conversations

# ---- base image to inherit from ----
FROM python:3.13.3-alpine AS base
FROM python:3.13.3-slim AS base

# Upgrade system packages to install security updates
RUN apk update && \
apk upgrade
RUN apt-get update && \
apt-get upgrade -y && \
rm -rf /var/lib/apt/lists/*

# ---- Back-end builder image ----
FROM base AS back-builder
Expand All @@ -17,14 +18,13 @@ ENV UV_PYTHON_DOWNLOADS=0

COPY --from=ghcr.io/astral-sh/uv:0.9.26 /uv /uvx /bin/

# Install Rust and Cargo using Alpine's package manager
RUN apk add --no-cache \
build-base \
# Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libffi-dev \
libxml2-dev \
libxslt-dev \
rust \
cargo
libxslt1-dev \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app

Expand Down Expand Up @@ -52,9 +52,10 @@ FROM base AS link-collector
ARG CONVERSATIONS_STATIC_ROOT=/data/static

# Install pango & rdfind
RUN apk add \
pango \
rdfind
RUN apt-get update && apt-get install -y --no-install-recommends \
libpango-1.0-0 \
rdfind \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app

Expand All @@ -80,18 +81,20 @@ FROM base AS core
ENV PYTHONUNBUFFERED=1

# Install required system libs
RUN apk add \
cairo \
RUN apt-get update && apt-get install -y --no-install-recommends \
libcairo2 \
file \
font-noto \
font-noto-emoji \
fonts-noto-core \
fonts-noto-color-emoji \
gettext \
gdk-pixbuf \
libffi-dev \
libgdk-pixbuf-2.0-0 \
libffi8 \
libxml2 \
libxslt \
pango \
shared-mime-info
libxslt1.1 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
shared-mime-info \
&& rm -rf /var/lib/apt/lists/*

COPY ./docker/files/etc/mime.types /etc/mime.types

Expand Down Expand Up @@ -128,7 +131,9 @@ FROM core AS backend-development
USER root:root

# Install psql
RUN apk add postgresql-client
RUN apt-get update && apt-get install -y --no-install-recommends \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*

# Install development dependencies
RUN --mount=from=ghcr.io/astral-sh/uv:0.9.26,source=/uv,target=/bin/uv \
Expand All @@ -149,8 +154,8 @@ CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
# ---- Production image ----
FROM core AS backend-production

# Remove apk cache, we don't need it anymore
RUN rm -rf /var/cache/apk/*
# Remove apt lists, we don't need them anymore
RUN rm -rf /var/lib/apt/lists/*

ARG CONVERSATIONS_STATIC_ROOT=/data/static

Expand Down
2 changes: 1 addition & 1 deletion src/backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies = [
"langfuse==3.10.0",
"lxml==5.4.0",
"markdown==3.10",
"markitdown==0.0.2",
"markitdown==0.1.5",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

markitdown python library 0.1.5 API convert_stream method

💡 Result:

The markitdown Python library (version 0.1.5, released 2026-02-20) is a Microsoft tool for converting files (PDF, Office docs, images, etc.) to Markdown for LLM use. The MarkItDown class has a primary convert(path) method, but also exposes convert_stream(stream) for advanced use. The convert_stream method converts a binary file-like object (e.g., open(file, 'rb') or io.BytesIO) to Markdown. In v0.1.5 (post-0.1.0 breaking changes), it requires a binary stream only—no text streams like io.StringIO. This aligns with DocumentConverter changes to use streams instead of paths, avoiding temp files. Example usage (inferred from context): from markitdown import MarkItDown import io md = MarkItDown with open('file.pdf', 'rb') as f: result = md.convert_stream(f) print(result.text_content) Official docs are in the GitHub README at https://github.com/microsoft/markitdown (packages/markitdown contains source). No full API docs found beyond README; check source for details. PyPI: https://pypi.org/project/markitdown/0.1.5/.

Citations:


🏁 Script executed:

fd markitdown.py --type f

Repository: suitenumerique/conversations

Length of output: 202


🏁 Script executed:

cat -n src/backend/chat/agent_rag/document_converter/markitdown.py

Repository: suitenumerique/conversations

Length of output: 1799


🏁 Script executed:

cat -n src/backend/chat/tests/agent_rag/document_converter/test_markitdown.py

Repository: suitenumerique/conversations

Length of output: 1427


markitdown 0.1.5 breaks the file_extension parameter—code will fail at runtime.

The upgrade from 0.0.2 to 0.1.5 introduces a breaking change. The convert_stream() method no longer accepts the file_extension parameter. The codebase calls convert_stream(document, file_extension=...) at line 39-41 of src/backend/chat/agent_rag/document_converter/markitdown.py, which will raise TypeError: convert_stream() got an unexpected keyword argument 'file_extension' when executed with 0.1.5.

Either revert to 0.0.2, refactor _convert() to use a different API, or wait for a version that restores compatibility.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/backend/pyproject.toml` at line 54, The dependency upgrade to
markitdown==0.1.5 is breaking because convert_stream() no longer accepts
file_extension; either pin markitdown back to 0.0.2 in pyproject.toml or update
the converter code: locate the _convert() implementation in
src/backend/chat/agent_rag/document_converter/markitdown.py where
convert_stream(document, file_extension=...) is called and remove the
file_extension kwarg and adapt to the new convert_stream API (call
convert_stream(document) and handle its return format), ensuring behavior and
tests remain unchanged.

"mozilla-django-oidc==4.0.1",
"nested-multipart-parser==1.6.0",
"posthog==7.0.0",
Expand Down
Loading
Loading