Files
web-page-backend/agent-office/app/telegram_bot.py
gahusb 86e7f727eb feat: Ollama qwen3:14b 기반 AI 뉴스 요약 + 텔레그램 통합 허브
- stock-lab: POST /api/stock/news/summarize 추가 (Ollama /api/generate 호출, 토큰/duration 추적)
- agent-office: telegram 패키지 분해 (client/formatter/messaging/webhook/router/agent_registry)
- send_agent_message 통합 API로 에이전트 중립 메시지 포맷 표준화
- 텔레그램 → 에이전트 명령 라우터 (/status, /stock news, /music credits 등)
- 토큰 사용량 집계 API 및 GET /agents/{id}/token-usage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 01:44:27 +09:00

28 lines
799 B
Python

"""Deprecated: app.telegram 패키지 사용 권장. 하위 호환용 re-export."""
from .telegram import handle_webhook, send_approval_request, send_raw, setup_webhook
from .telegram.messaging import send_agent_message
# 기존 호출자가 쓰던 이름들
async def send_message(text: str, reply_markup: dict = None) -> dict:
return await send_raw(text, reply_markup)
async def send_stock_summary(summary: str) -> dict:
return await send_raw(summary)
async def send_task_result(agent_id: str, title: str, result: str) -> dict:
return await send_agent_message(agent_id, "report", title, result)
__all__ = [
"send_message",
"send_stock_summary",
"send_task_result",
"send_approval_request",
"send_agent_message",
"handle_webhook",
"setup_webhook",
]