Backend:
- Fix TicketInput ticket_id type (int|str -> str) — Pydantic 500 on numeric IDs
- Fix LLM module: add missing logger import, handle 429 and non-200 responses
- Switch LLM model to poolside/laguna-m.1:free (avoid OpenRouter rate limits)
- Add GET /api/collections/{id} endpoint to fetch single collection
- Deduplicate tickets: replace randomized hash() with deterministic
hashlib.md5 for Qdrant point IDs
- Add get_existing_ticket_ids() — scroll Qdrant before processing,
skip already-imported tickets, avoid redundant embeddings
- Multi-tenant isolation: tenant_id + collection_id in all Qdrant filters
- Fix embedding: drop incompatible openai SDK, use raw httpx
- Fix reranking: access ScoredPoint.payload via .get(), not []
- Fix chunking: expand role detection (support/operator/agent + client/user/customer)
- Fix bcrypt: downgrade to 4.0.1 (incompatible 5.x with passlib)
Frontend:
- Register: add plan selection (free/starter/pro)
- CollectionView: fetch ticket_count from backend on mount
(not only from upload response — survived page refresh)
- uploadFile: use getToken() instead of stale module-level var,
show real HTTP status in error messages
- Nginx: increase client_max_body_size to 50M for file uploads
69 lines
1.7 KiB
YAML
69 lines
1.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: backend
|
|
namespace: support-bot
|
|
labels:
|
|
app: backend
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: backend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: backend
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: regcred
|
|
containers:
|
|
- name: backend
|
|
image: git.itoservice.ru/dosnav/support-bot-saas/backend:latest
|
|
ports:
|
|
- containerPort: 8000
|
|
env:
|
|
- name: DATABASE_URL
|
|
value: postgresql+asyncpg://postgres:postgres@postgres:5432/support_bot
|
|
- name: REDIS_URL
|
|
value: redis://redis:6379/0
|
|
- name: QDRANT_URL
|
|
value: http://qdrant:6333
|
|
- name: OPENROUTER_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: app-env
|
|
key: OPENROUTER_API_KEY
|
|
- name: OPENROUTER_EMBEDDING_MODEL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: app-env
|
|
key: OPENROUTER_EMBEDDING_MODEL
|
|
- name: OPENROUTER_LLM_MODEL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: app-env
|
|
key: OPENROUTER_LLM_MODEL
|
|
- name: JWT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: app-env
|
|
key: JWT_SECRET
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: 8000
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: backend
|
|
namespace: support-bot
|
|
spec:
|
|
selector:
|
|
app: backend
|
|
ports:
|
|
- port: 8000
|
|
targetPort: 8000
|