fix(phase34): image_analysis 用正確 bot token 下載 + NemoTron 回覆
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
- 下載圖片改用 OPENCLAW_TG_BOT_TOKEN(polling bot) - 結果改用 send_as_nemotron 從 NemoTron bot 回覆到群組 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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"🖼️ <b>圖片分析</b>\n{result}")
|
||||
await tg.send_as_nemotron(f"🖼️ <b>圖片分析</b>\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
|
||||
|
||||
Reference in New Issue
Block a user