mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
This feature enables xiaozhi-server to process images you upload via the
/mcp/vision/explain HTTP endpoint and provide spoken feedback based on
the image content.
Key changes:
- Introduced an internal event system (`core/events/vision_events.py`)
using asyncio.Queue to decouple image processing from dialogue handling.
- Modified `VisionHandler` (`core/api/vision_handler.py`) to publish the
textual output from the VLLM to this event system, instead of
returning it directly in the HTTP response. The HTTP response now
serves as an acknowledgment.
- Enhanced `ConnectionHandler` (`core/connection.py`):
- It now listens for visual context events relevant to its device_id.
- Stores the received visual text.
- Uses an asyncio.Event (`visual_context_ready_event`) to signal
the arrival of visual context.
- Integrates the visual context into the prompt sent to the main LLM
provider, allowing the LLM to generate responses informed by the
image content.
- Implements a timeout mechanism to wait for visual context if a
vision-related query is made before the context is available.
- The spoken feedback is delivered through the existing TTS pipeline,
processing the LLM's now visually-informed response.
This provides a more integrated way for you to interact with the
system regarding visual information.
|
||
|---|---|---|
| .. | ||
| manager-api | ||
| manager-web | ||
| xiaozhi-server | ||
| README.md | ||
本文档是开发类文档,如需部署小智服务端,点击这里查看部署教程
项目目录介绍
如果你是一名软件开发者,这里有一份《致开发者的公开信》,欢迎归队!
xiaozhi-esp32-server
├─ xiaozhi-server 8000 端口 Python语言开发 负责与esp32通信
├─ manager-web 8001 端口 Node.js+Vue开发 负责提供控制台的web界面
├─ manager-api 8002 端口 Java语言开发 负责提供控制台的api
xiaozhi-server 和ESP32通讯协议
https://ccnphfhqs21z.feishu.cn/wiki/M0XiwldO9iJwHikpXD5cEx71nKh