agentconnect.agents.telegram.message_processor module¶
Message processor for Telegram messages.
This module contains the message processor class that handles the processing of Telegram messages through the AgentConnect framework.
- class TelegramMessageProcessor(agent_id, identity, bot_manager)¶
Bases:
object
Processor for Telegram messages.
This class handles the processing of Telegram messages through the AgentConnect framework and sending responses back to Telegram. It also supports handling collaboration requests from other agents.
- Parameters:
agent_id (str)
identity (AgentIdentity)
bot_manager (TelegramBotManager)
- async process_group_mention(message)¶
Process a group mention.
- Parameters:
message (
Message
) – Telegram message
- async process_media_message(message, media_type)¶
Process a media message.
- Parameters:
message (
Message
) – Telegram messagemedia_type (
str
) – Type of media
- async process_text_message(message)¶
Process a text message.
- Parameters:
message (
Message
) – Telegram message
- async process_agent_response(workflow, message, interaction_control)¶
Process an AgentConnect message through the agent workflow.