From 7e5ac00d6253f41653b9113afdd45546e19efb0d Mon Sep 17 00:00:00 2001 From: OG T Date: Fri, 10 Apr 2026 13:58:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(phase34):=20image=5Fanalysis=20=E7=94=A8?= =?UTF-8?q?=E6=AD=A3=E7=A2=BA=20bot=20token=20=E4=B8=8B=E8=BC=89=20+=20Nem?= =?UTF-8?q?oTron=20=E5=9B=9E=E8=A6=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 下載圖片改用 OPENCLAW_TG_BOT_TOKEN(polling bot) - 結果改用 send_as_nemotron 從 NemoTron bot 回覆到群組 Co-Authored-By: Claude Sonnet 4.6 --- apps/api/src/services/image_analysis_service.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/api/src/services/image_analysis_service.py b/apps/api/src/services/image_analysis_service.py index 122e99bd6..b49c55abf 100644 --- a/apps/api/src/services/image_analysis_service.py +++ b/apps/api/src/services/image_analysis_service.py @@ -168,10 +168,11 @@ class ImageAnalysisService: question=question, ) if result: + # Phase 34: 用 NemoTron bot 回覆圖片分析結果 from src.services.telegram_gateway import get_telegram_gateway tg = get_telegram_gateway() await tg.initialize() - await tg.send_text(f"🖼️ 圖片分析\n{result}") + await tg.send_as_nemotron(f"🖼️ 圖片分析\n{result}") except Exception as e: logger.warning("download_and_analyze_failed", error=str(e)) @@ -180,7 +181,8 @@ class ImageAnalysisService: try: from src.core.config import get_settings cfg = get_settings() - bot_token = cfg.TELEGRAM_BOT_TOKEN + # Phase 34: polling 用 OPENCLAW_TG_BOT_TOKEN 下載圖片 + bot_token = cfg.OPENCLAW_TG_BOT_TOKEN or cfg.TELEGRAM_BOT_TOKEN http = await self._get_http() # Step 1: getFile → file_path