feat: make ai_operator_settings config code the source of truth
Add sync_ai_operator_config_from_code() which overwrites the DB-cached ai_operator_settings row from ai_operator_default_config() on startup of ai_orchestrator_service and ai_voice_runtime_service. Greeting and system prompt changes now go through git + deploy instead of manual psql/API edits to prod. Also adds a root README pointing to existing docs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# call-center
|
||||
|
||||
Омниканальный контакт-центр: телефония (Asterisk), Telegram, WhatsApp, веб-чат, email — плюс встроенный голосовой ИИ-оператор (распознавание речи → LLM → синтез речи). Написан на Python (FastAPI), ~25 сервисов вокруг одной SQLAlchemy-схемы, локально работает на SQLite, в проде — на PostgreSQL.
|
||||
|
||||
## Документация
|
||||
|
||||
| Документ | Про что |
|
||||
|---|---|
|
||||
| [`docs/architecture/overview.md`](docs/architecture/overview.md) | Обзор микросервисов и их ролей |
|
||||
| [`docs/architecture/voice-ai.md`](docs/architecture/voice-ai.md) | Голосовой ИИ-оператор подробно |
|
||||
| [`docs/architecture/real-time-voice-service.md`](docs/architecture/real-time-voice-service.md) | Рантайм голосового моста (AudioSocket, TTS/ASR) |
|
||||
| [`docs/architecture/event-schemas.md`](docs/architecture/event-schemas.md) | Схемы событий шины (RabbitMQ) |
|
||||
| [`docs/runbooks/local-setup.md`](docs/runbooks/local-setup.md) | Как поднять проект локально (демо-режим и ручной запуск) |
|
||||
| [`docs/runbooks/deployment.md`](docs/runbooks/deployment.md) | Как разворачивать (Docker Compose / Kubernetes) |
|
||||
| [`longread.md`](longread.md) | Сквозной архитектурный ревью репозитория — что реально есть, где технический долг |
|
||||
|
||||
## Быстрый старт
|
||||
|
||||
Подробности — в [`docs/runbooks/local-setup.md`](docs/runbooks/local-setup.md). Коротко:
|
||||
|
||||
```bash
|
||||
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`.
|
||||
|
||||
## Тесты
|
||||
|
||||
```bash
|
||||
pytest -q
|
||||
```
|
||||
|
||||
## Частые задачи
|
||||
|
||||
- **Поменять greeting/system prompt голосового бота Айнур** — правится в коде: `services/shared/ai_operator_config.py` → `ai_operator_default_config()`, коммит и деплой; сервис сам синкает значение в БД при старте.
|
||||
Reference in New Issue
Block a user