817 B
817 B
Quickstart: Unified AI Architecture
1. Setup the AI Host (Desk-5439)
- Install Ollama and pull
gemma4:9bandnomic-embed-text. - Start the Qdrant container with persistent storage.
- Start n8n and configure the API key to connect to the DMS backend.
2. Environment Variables (Backend)
Add the following to your .env:
AI_HOST_URL=http://<desk-5439-ip>
AI_QDRANT_URL=http://<desk-5439-ip>:6333
AI_N8N_WEBHOOK_URL=http://<desk-5439-ip>:5678
AI_N8N_SERVICE_TOKEN=your-secure-token
3. Usage Flow (RAG)
- User submits a query via the Next.js
RagChatWidget. - Backend validates JWT and creates a BullMQ job on
rag-query-queue. - Worker retrieves the job, injects the
projectPublicIdfilter into Qdrant. - Worker fetches context, queries Ollama, and streams/returns the response.