didar 9bf367abf4
deploy / deploy (push) Successful in 30s
fix: filter RU/KZ stopwords from KB search so filler words can't false-match
search_kb_rows had no relevance floor: any exact-token hit, however
generic, scored above zero and could win as the top/only result. A
caller utterance as thin as a bare "да" (confirming the language) could
exact-match that same common word inside an unrelated FAQ article's
body and get returned as "the" answer, which then got read back
almost verbatim — this is what surfaced live as the AI unprompted
launching into a voucher-activation explanation right after the
customer confirmed Russian, having said nothing else.

tokenize_kb_text now drops a curated set of RU/KZ greetings,
confirmations, pronouns, and particles. A stopword-only query naturally
falls through to the existing "no query tokens -> no results" path
instead of returning a coincidental match; genuine single-content-word
queries (e.g. "ваучер") are unaffected. Applies to every channel that
calls _kb_search (voice, Telegram, WhatsApp), not just voice.
2026-08-31 01:08:11 +05:00
2026-05-09 09:16:06 +05:00
2026-05-09 09:16:06 +05:00

call-center

Омниканальный контакт-центр: телефония (Asterisk), Telegram, WhatsApp, веб-чат, email — плюс встроенный голосовой ИИ-оператор (распознавание речи → LLM → синтез речи). Написан на Python (FastAPI), ~25 сервисов вокруг одной SQLAlchemy-схемы, локально работает на SQLite, в проде — на PostgreSQL.

Документация

Документ Про что
docs/architecture/overview.md Обзор микросервисов и их ролей
docs/architecture/voice-ai.md Голосовой ИИ-оператор подробно
docs/architecture/real-time-voice-service.md Рантайм голосового моста (AudioSocket, TTS/ASR)
docs/architecture/event-schemas.md Схемы событий шины (RabbitMQ)
docs/runbooks/local-setup.md Как поднять проект локально (демо-режим и ручной запуск)
docs/runbooks/deployment.md Как разворачивать (Docker Compose / Kubernetes)
longread.md Сквозной архитектурный ревью репозитория — что реально есть, где технический долг

Быстрый старт

Подробности — в docs/runbooks/local-setup.md. Коротко:

python -m pip install -r requirements.txt
cp .env.example .env      # по умолчанию SQLite, без Docker

python scripts/migrate_core_db.py
uvicorn gateway.app:app --reload --port 8080

Точки входа (после старта gateway): /operator, /supervisor, /admin, /analyst на http://localhost:8080.

Демо-режим одной командой (поднимает весь стек + тестовые данные): scripts/prepare_demo.ps1.

Тесты

pytest -q

Частые задачи

  • Поменять greeting/system prompt голосового бота Айнур — правится в коде: services/shared/ai_operator_config.pyai_operator_default_config(), коммит и деплой; сервис сам синкает значение в БД при старте.
S
Description
migrated from gitlab.konturai.kz
Readme
3.3 MiB
Languages
Python 74.2%
JavaScript 18.8%
HTML 3.4%
CSS 2.9%
PowerShell 0.4%
Other 0.3%