From 6f91f45065135229428d4d8893a6e00ad3f00bb6 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Thu, 23 Jul 2026 23:34:13 +0800 Subject: [PATCH] Add new state code for photo recognition failure in chat stream mode - Updated documentation and API endpoint to include a new state code '0005' for handling cases where photo recognition fails consecutively, directing to human assistance. - Ensured consistency between documentation and code for improved clarity in state management. --- docs/chat-stream-mode.md | 1 + src/api/endpoints.py | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/chat-stream-mode.md b/docs/chat-stream-mode.md index 3f37bf1..70ee761 100644 --- a/docs/chat-stream-mode.md +++ b/docs/chat-stream-mode.md @@ -32,6 +32,7 @@ POST http://localhost:8000/chat?stream=true | 0001 | 转接人工 | | 0002 | 语义无法识别转接人工 | | 0003 | 有人伤转接人工 | +| 0005 | 拍照连续识别失败转人工 | | 1001 | 未准备好通话 | | 1002 | 通话中 | | 2000 | 进入单车拍照 | diff --git a/src/api/endpoints.py b/src/api/endpoints.py index c290d31..1268f18 100644 --- a/src/api/endpoints.py +++ b/src/api/endpoints.py @@ -21,6 +21,7 @@ STATUS_CODE_MAP = { '0001': '转接人工', '0002': '语义无法识别转接人工', '0003': '有人伤转接人工', + '0005': '拍照连续识别失败转人工', '1001': '未准备好通话', '1002': '通话中', '2000': '进入单车拍照',