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)
G.2.5 - Tests:
- Add pytest test suite with fixtures
- test_preprocessing.py - PDF/image loading, normalization, validation
- test_postprocessing.py - chunks, QA pairs, markdown generation
- test_inference.py - dummy parser and inference functions
- test_api.py - API endpoint tests
- Add pytest.ini configuration
G.1.3 - dots.ocr Integration:
- Update model_loader.py with real model loading code
- Support for AutoModelForVision2Seq and AutoProcessor
- Device handling (CUDA/CPU/MPS) with fallback
- Error handling with dummy fallback option
- Update inference.py with real model inference
- Process images through model
- Generate and decode outputs
- Parse model output to blocks
- Add model_output_parser.py
- Parse JSON or plain text model output
- Convert to structured blocks
- Layout detection support (placeholder)
Dependencies:
- Add pytest, pytest-asyncio, httpx for testing
- Mark G.2.3 (PDF/image support) as completed
- Mark G.2.4 (pre/post-processing) as completed
- Mark G.1.3 (configuration) as completed
- All preprocessing and postprocessing functions implemented
- Replace Whisper subprocess calls with direct qwen3_asr_toolkit API
- Remove subprocess dependencies, use pure Python API
- Update to use DASHSCOPE_API_KEY instead of WHISPER_MODEL
- Cleaner code without CLI calls
- Better Ukrainian language recognition quality
- Add STT service with Whisper support (faster-whisper, whisper CLI, OpenAI API)
- Update Gateway to handle Telegram voice/audio/video_note messages
- Add STT service to docker-compose.yml
- Gateway now converts voice → text → DAGI Router → text response
- Remove all FK constraints from models (users, teams, channels, agents)
- Keep fields as optional nullable String for testing DAARWIZZ
- Update SQL migration to remove all REFERENCES
- Fix metadata -> meta in migration
- Allows service to work without base tables for testing
- Remove FK constraint from UserFact.team_id (teams table may not exist)
- Update SQL migration to remove FK constraint
- team_id remains optional String field without FK
- Fix DialogSummary.metadata -> DialogSummary.meta
- Fix AgentMemoryFactsVector.metadata -> AgentMemoryFactsVector.meta
- All metadata fields now renamed to meta
- Rename metadata to meta in all models (UserFact, DialogSummary, AgentMemoryFactsVector)
- Update schemas to use meta instead of metadata
- Update SQL migration to use meta column name
- Fixes SQLAlchemy reserved name conflict
- Add memory-service as a service (not under networks:)
- Create Dockerfile for memory-service
- Configure depends_on city-db with healthcheck condition
- Set DATABASE_URL to connect to city-db
- Move models.py, schemas.py, crud.py, main.py to app/
- Update imports to use app.* prefix
- Update README with new structure
- Fix uvicorn run command for new structure
- Fixed Gateway to extract response from data.text field
- GPU working: RTX 4000 Ada, response time 7-10s (was 30-40s)
- DAARWIZZ now responds correctly with full personality
- Started Memory Service structure
- Update Wallet Service: balance checks (1 DAARION for create, 0.01 for usage)
- Update DAOFactory Service: use new balance checks
- Add DB migration: teams type field and city_links table
- Add DAARION.city seed data
- Create teams API routes with balance validation
- Add DAARION.city remote repository
- Add sync scripts and documentation
- Fixed Gateway: 'prompt' → 'message' field name
- Increased LLM provider timeout from 30s to 60s
- Added OLLAMA-OPTIMIZATION.md with performance tips
- DAARWIZZ now responds (slowly but works)
- Updated gateway-bot/daarwizz_prompt.txt with v3 system prompt
- Created docs/daarwizz/PROFILE.md with complete agent profile
- Defines DAARWIZZ as digital mayor and MoE coordinator
- Specifies communication style, roles, security policies
- Integration with full DAGI Stack (Router, DevTools, CrewAI, RBAC)
- Knowledge base references to official DAARION.city docs
DAARWIZZ - Official AI agent for DAARION.city ecosystem
Changes:
- gateway-bot/daarwizz_prompt.txt: System prompt defining DAARWIZZ personality
- gateway-bot/http_api.py: Load and inject DAARWIZZ context into Router requests
- gateway-bot/Dockerfile: Copy DAARWIZZ prompt file to container
- providers/llm_provider.py: Support context.system_prompt from Gateway
Features:
- Telegram webhook sends agent='daarwizz' to Router
- System prompt loaded from file (customizable)
- LLM receives full DAARWIZZ context + RBAC
- Discord support included
Usage:
- User messages DAARWIZZ in Telegram
- Gateway enriches with system prompt + RBAC
- Router routes to LLM with full context
- DAARWIZZ responds with DAO-aware answers
Next: Set TELEGRAM_BOT_TOKEN and test first dialog