Ollama Runtime: - Add ollama_client.py for Ollama API integration - Support for dots-ocr model via Ollama - Add OLLAMA_BASE_URL configuration - Update inference.py to support Ollama runtime (RUNTIME_TYPE=ollama) - Update endpoints to handle async Ollama calls - Alternative to local transformers model RAG Implementation Plan: - Create TODO-RAG.md with detailed Haystack integration plan - Document Store setup (pgvector) - Embedding model selection - Ingest pipeline (PARSER → RAG) - Query pipeline (RAG → LLM) - Integration with DAGI Router - Bot commands (/upload_doc, /ask_doc) - Testing strategy Now supports three runtime modes: 1. Local transformers (RUNTIME_TYPE=local) 2. Ollama (RUNTIME_TYPE=ollama) 3. Dummy (USE_DUMMY_PARSER=true)
28 lines
490 B
Plaintext
28 lines
490 B
Plaintext
# FastAPI and server
|
|
fastapi==0.104.1
|
|
uvicorn[standard]==0.24.0
|
|
python-multipart==0.0.6
|
|
pydantic==2.5.0
|
|
pydantic-settings==2.1.0
|
|
|
|
# Model and ML
|
|
torch>=2.0.0
|
|
transformers>=4.35.0
|
|
Pillow>=10.0.0
|
|
|
|
# PDF processing
|
|
pdf2image>=1.16.3
|
|
PyMuPDF>=1.23.0 # Alternative PDF library
|
|
|
|
# Image processing
|
|
opencv-python>=4.8.0 # Optional, for advanced image processing
|
|
|
|
# Utilities
|
|
python-dotenv>=1.0.1
|
|
|
|
# Testing
|
|
pytest>=7.4.0
|
|
pytest-asyncio>=0.21.0
|
|
httpx>=0.25.0 # For TestClient and Ollama client
|
|
|