diff --git a/utils/api.js b/utils/api.js index 1771744..2497766 100644 --- a/utils/api.js +++ b/utils/api.js @@ -42,6 +42,12 @@ const API = { ai: { chat: (data) => request.post('/ai/chat', data), + // 语音 / 图片都只做识别并返回文本,不在服务端自动投递(见 api/health/handler/ai_media.js)。 + // 语音优先走 /chat 的实时分片链路(asr_start/asr_chunk/asr_stop), + // 这里的整段接口是分片缺失或链路失败时的兜底;图片由客户端先上屏,识别文本直接落成 AI 回复。 + // 识别链路最长可到 60s,单独放宽超时,避免网络稍慢就整单失败 + asr: (data) => request.post('/health/ai/asr', data, { timeout: 90000 }), + ocr: (data) => request.post('/health/ai/ocr', data, { timeout: 90000 }), }, }