WhatsApp AI Bot 投产:3个月,5万条消息,零停机

发布: (2025年12月10日 GMT+8 10:19)
2 min read
原文: Dev.to

Source: Dev.to

Cover image for WhatsApp AI Bot in Production: 3 Months, 50K Messages, Zero Downtime

挑战

我的客户有一个问题:每天超过200条 WhatsApp 消息,有两个人在回复,但仍然在高峰期因为响应时间超过 2 小时而失去客户。

他们的需求:“你能做一个真正好用的机器人吗?”

技术栈

WhatsApp Business API
        |
    Evolution API (self-hosted)
        |
    FastAPI Backend
        |
    Yoshii IA (Brazilian Portuguese LLM)
        |
    PostgreSQL + Redis

有何不同

1. 它真的懂葡萄牙语

不是翻译的英文,而是原生巴西葡萄牙语。

Customer: "ce tem a blusa azul em P?"
(Informal: "u got the blue shirt in S?")

Bot: "Temos sim! A blusa azul ta disponivel em P, M e G.
     Quer que eu reserve pra voce?"

2. 智能交接

Bot handles 80 % of queries. Complex cases go to humans with full context:

if sentiment_score | Evolution API  |---->| Webhook  |
| Cloud API   |     | (self-hosted)  |     | Handler  |
+-------------+     +----------------+     +----------+
                                                |
                    +---------------------------+
                    |
              +-----v-----+     +---------+
              | Message   |---->| Yoshii  |
              | Processor |     | LLM API |
              +-----------+     +---------+
                    |
              +-----v-----+
              | Response  |
              | Generator |
              +-----------+
                    |
              +-----v-----+
              | Queue     |-----> Send via WhatsApp
              +-----------+

成本明细

项目月费用
WhatsApp Business API$50
VPS(4 GB RAM)$20
LLM 推理(自托管)$0
Redis Cloud(免费层)$0
PostgreSQL(同一 VPS)$0
总计$70/month

开源

驱动此系统的 LLM 是开源的:

接下来

  • 语音消息处理(Whisper 集成)
  • 主动消息(订单状态更新)
  • 多语言支持
  • 分析仪表盘

想构建类似的东西吗?欢迎在评论区交流!

sakaguchi.ia.br | WhatsApp

Back to Blog

相关文章

阅读更多 »