Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Building Ask Leya: Lessons Learned from Local ONNX Embeddings, Prisma Migrations, and Express Async Handlers

Описание и применение

Создан чат‑виджет, использующий локальные ONNX‑модели для многоязычного поиска, упрощённые миграции Prisma и надёжную обработку асинхронных ошибок в Express.

Задача

Need a chat widget that answers from a business’s own content, supports multiple languages locally, handles database migrations with unreleased modules, and properly forwards async errors in Express.

Результат

The project achieved a multilingual, locally hosted chat widget with efficient embeddings, streamlined migrations, and robust async error handling, reducing external dependencies and improving response reliability.

Рабочий процесс

  • 1. Load paraphrase-multilingual-MiniLM-L12-v2 ONNX model in-process for vector embeddings.
  • 2. Embed user query and match against English knowledge base using pgvector.
  • 3. Return answer in user language via chat model.
  • 4. Use prisma migrate diff to filter additive statements for unreleased tables.
  • 5. Add Express error-handling middleware to catch async rejections and send responses.

Доказательства

Cross-language retrieval is local, not the LLM Retrieval uses paraphrase-multilingual-MiniLM-L12-v2 through ONNX, in-process — 384 dims, trained across 50+ languages.

Источник

Express 4 doesn't forward async rejections

Источник

  • Дата записи: 2026-09-15T02:46:53.673Z