chat.tasks#

Contains Celery tasks.

Module Contents#

Classes#

ConversationInfo

Contains basic conversation information available to bots.

Functions#

deliver_message_to_bot(bot_participant_id, message_id)

Send a message to a bot.

deliver_status_to_bot(status, bot_participant_id)

Send status information to a bot.

class ConversationInfo#

Bases: NamedTuple

Contains basic conversation information available to bots.

conversation_id: str#
bot_participant_id: str#
send_function: collections.abc.Callable[[dict[str, Any]], Message]#
deliver_message_to_bot(bot_participant_id, message_id, field_overrides=None)#

Send a message to a bot.

Parameters:
  • bot_participant_id (str) – id of the participant that corresponds to this bot in this conversation

  • message_id (int) – id of the message that is being sent to the bot

  • field_overrides (dict[str, Any] | None) – dict from field names to the values that should replace the actual values

Return type:

None

deliver_status_to_bot(status, bot_participant_id)#

Send status information to a bot.

Parameters:
  • status (dict[str, Any]) – the status update to be sent

  • bot_participant_id (str) – id of the participant that corresponds to this bot in this conversation

Return type:

None