From e4588303fbb0f2adc0604a05b28bcf4eff32e3f6 Mon Sep 17 00:00:00 2001 From: marco Date: Tue, 2 Jun 2026 14:38:56 +0800 Subject: [PATCH] =?UTF-8?q?feat(compare):=20=E5=8A=A0=20/api/v1/intent/ste?= =?UTF-8?q?p=20=E9=80=8F=E4=BC=A0=E5=88=B0=20pricebot(=E6=B7=98=E5=AE=9D?= =?UTF-8?q?=E5=A4=9A=E5=B8=A7=E6=84=8F=E5=9B=BE=E8=AF=86=E5=88=AB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 配套 pricebot-backend 的 /api/intent/step(淘宝源 Phase 1 多帧意图识别: 展开 + 滚动 采集 → LLM 提取)。沿用 _passthrough 壳: 不鉴权、原样转发, 客户端循环调用直到 done (done 帧顶层带 result + calibration)。目前仅淘宝源走这条, 其它源走单次 /intent/recognize。 Co-Authored-By: Claude Opus 4.8 --- app/api/v1/compare.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/api/v1/compare.py b/app/api/v1/compare.py index 1da32dd..2a3b5f3 100644 --- a/app/api/v1/compare.py +++ b/app/api/v1/compare.py @@ -83,6 +83,13 @@ async def intent_recognize(request: Request) -> dict[str, Any]: return await _passthrough(request, "/api/intent/recognize") +@router.post("/intent/step", summary="外卖比价 Phase 1 多帧意图识别 (透传到 pricebot, 仅淘宝源)") +async def intent_step(request: Request) -> dict[str, Any]: + # 多帧版意图识别(展开+滚动采集→提取): 循环调用直到 done(done 帧顶层带 + # result+calibration)。目前仅淘宝源走这条, 其它源走上面单次 /intent/recognize。 + return await _passthrough(request, "/api/intent/step") + + @router.post("/price/step", summary="外卖比价 Phase 2 步进 (透传到 pricebot)") async def price_step(request: Request) -> dict[str, Any]: return await _passthrough(request, "/api/price/step")