RAG: ночная пакетная индексация эмбеддингов, очередь embedding_queue, MCP get_organization_context, снижение OLLAMA_KEEP_ALIVE

This commit is contained in:
2026-07-08 15:57:25 +03:00
parent 1e9131753d
commit 70dfe07fa6
11 changed files with 440 additions and 83 deletions

View File

@@ -230,13 +230,7 @@ export function registerMcpRagRoutes(app: import("express").Express): void {
...(aiSummaryIsAuto !== undefined ? { aiSummaryIsAuto } : {}),
});
const { buildFormText, upsertEmbedding } = await import('../services/embedding.service');
const [fields, statuses] = await Promise.all([
storage.getFormFields(formId, req.organizationId!),
storage.getFormStatuses(formId, req.organizationId!),
]);
const content = buildFormText(updated, fields, statuses);
upsertEmbedding(req.organizationId!, 'form', formId, content, { name: updated.name }).catch(() => {});
storage.enqueueEmbedding(req.organizationId!, 'form', formId, 'upsert').catch(() => {});
res.json({ success: true, form: updated });
} catch (error) {