c2743251e9
Self-evolving AI scientist framework built on LangGraph/LangChain with CLI/TUI core, FastAPI gateway, and Next.js frontend. Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
20 lines
544 B
Python
20 lines
544 B
Python
from ..channel_manager import _parse_csv, register_channel
|
|
from .channel import TelegramChannel, TelegramConfig
|
|
|
|
__all__ = ["TelegramChannel", "TelegramConfig"]
|
|
|
|
|
|
def create_from_config(config) -> TelegramChannel:
|
|
allowed = _parse_csv(config.telegram_allowed_senders)
|
|
proxy = config.telegram_proxy or None
|
|
return TelegramChannel(
|
|
TelegramConfig(
|
|
bot_token=config.telegram_bot_token,
|
|
allowed_senders=allowed,
|
|
proxy=proxy,
|
|
)
|
|
)
|
|
|
|
|
|
register_channel("telegram", create_from_config)
|