feat(backend): add chat service with evidence gating and citation validation

This commit is contained in:
omp committed 2026-11-01 19:19:45 -03:00
1 parent 9be09921bc
commit 99bc46f053
3 files changed
+596 -2

No files matched your search

+8 -2
View File
@@ -4,7 +4,8 @@ ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
OMP_NUM_THREADS=2 \
TOKENIZERS_PARALLELISM=false
TOKENIZERS_PARALLELISM=false \
TORCH_HOME=/data/models
# tesseract-ocr + pacote de idioma português + libs de imagem do MuPDF
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -16,13 +17,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
WORKDIR /app
# PyTorch só com CPU: o wheel padrão traz ~4 GB de bibliotecas CUDA, inúteis aqui.
RUN pip install --no-cache-dir \
--index-url https://download.pytorch.org/whl/cpu \
"torch==2.5.1"
COPY requirements.txt requirements-dev.txt ./
RUN pip install --no-cache-dir -r requirements-dev.txt
COPY app ./app
COPY tests ./tests
RUN mkdir -p /data/vector_db /data/pdfs
RUN mkdir -p /data/vector_db /data/pdfs /data/models
EXPOSE 8000